2016-09-12 22:55:40 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Linaro Limited.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-09-12 22:55:40 +08:00
|
|
|
*/
|
2018-09-15 01:43:44 +08:00
|
|
|
#ifndef ZEPHYR_DRIVERS_GPIO_GPIO_CMSDK_AHB_H_
|
|
|
|
#define ZEPHYR_DRIVERS_GPIO_GPIO_CMSDK_AHB_H_
|
2016-09-12 22:55:40 +08:00
|
|
|
|
2022-05-06 16:25:46 +08:00
|
|
|
#include <zephyr/drivers/gpio.h>
|
2016-09-12 22:55:40 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* ARM LTD CMSDK AHB General Purpose Input/Output (GPIO) */
|
|
|
|
struct gpio_cmsdk_ahb {
|
|
|
|
/* Offset: 0x000 (r/w) data register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t data;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x004 (r/w) data output latch register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t dataout;
|
|
|
|
volatile uint32_t reserved0[2];
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x010 (r/w) output enable set register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t outenableset;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x014 (r/w) output enable clear register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t outenableclr;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x018 (r/w) alternate function set register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t altfuncset;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x01c (r/w) alternate function clear register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t altfuncclr;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x020 (r/w) interrupt enable set register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t intenset;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x024 (r/w) interrupt enable clear register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t intenclr;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x028 (r/w) interrupt type set register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t inttypeset;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x02c (r/w) interrupt type clear register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t inttypeclr;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x030 (r/w) interrupt polarity set register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t intpolset;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x034 (r/w) interrupt polarity clear register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t intpolclr;
|
2016-09-12 22:55:40 +08:00
|
|
|
union {
|
|
|
|
/* Offset: 0x038 (r/ ) interrupt status register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t intstatus;
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x038 ( /w) interrupt clear register */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t intclear;
|
2016-09-12 22:55:40 +08:00
|
|
|
};
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t reserved1[241];
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x400 - 0x7fc lower byte masked access register (r/w) */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t lb_masked[256];
|
2016-09-12 22:55:40 +08:00
|
|
|
/* Offset: 0x800 - 0xbfc upper byte masked access register (r/w) */
|
2020-05-28 00:26:57 +08:00
|
|
|
volatile uint32_t ub_masked[256];
|
2016-09-12 22:55:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-09-15 01:43:44 +08:00
|
|
|
#endif /* ZEPHYR_DRIVERS_GPIO_GPIO_CMSDK_AHB_H_ */
|