cc26x0_ioc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Leon George
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef CC26X0_IOC_H
20 #define CC26X0_IOC_H
21 
22 #include "cc26x0.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 #define MCU_IOC_BASE (0x40081000)
40 typedef struct {
41  reg32_t CFG[32];
43 
44 #define IOC ((cc26x0_ioc_regs_t *)(MCU_IOC_BASE))
50 #define IOCFG_PORTID_GPIO 0x00000000
51 #define IOCFG_PORTID_AON_SCS 0x00000001
52 #define IOCFG_PORTID_AON_SCK 0x00000002
53 #define IOCFG_PORTID_AON_SDI 0x00000003
54 #define IOCFG_PORTID_AON_SDO 0x00000004
55 #define IOCFG_PORTID_AON_CLK32K 0x00000007
56 #define IOCFG_PORTID_AUX_IO 0x00000008
57 #define IOCFG_PORTID_SSI0_RX 0x00000009
58 #define IOCFG_PORTID_SSI0_TX 0x0000000A
59 #define IOCFG_PORTID_SSI0_FSS 0x0000000B
60 #define IOCFG_PORTID_SSI0_CLK 0x0000000C
61 #define IOCFG_PORTID_I2C_MSSDA 0x0000000D
62 #define IOCFG_PORTID_I2C_MSSCL 0x0000000E
63 #define IOCFG_PORTID_UART0_RX 0x0000000F
64 #define IOCFG_PORTID_UART0_TX 0x00000010
65 #define IOCFG_PORTID_UART0_CTS 0x00000011
66 #define IOCFG_PORTID_UART0_RTS 0x00000012
67 #define IOCFG_PORTID_PORT_EVT0 0x00000017
68 #define IOCFG_PORTID_PORT_EVT1 0x00000018
69 #define IOCFG_PORTID_PORT_EVT2 0x00000019
70 #define IOCFG_PORTID_PORT_EVT3 0x0000001A
71 #define IOCFG_PORTID_PORT_EVT4 0x0000001B
72 #define IOCFG_PORTID_PORT_EVT5 0x0000001C
73 #define IOCFG_PORTID_PORT_EVT6 0x0000001D
74 #define IOCFG_PORTID_PORT_EVT7 0x0000001E
75 #define IOCFG_PORTID_SWV 0x00000020
76 #define IOCFG_PORTID_SSI1_RX 0x00000021
77 #define IOCFG_PORTID_SSI1_TX 0x00000022
78 #define IOCFG_PORTID_SSI1_FSS 0x00000023
79 #define IOCFG_PORTID_SSI1_CLK 0x00000024
80 #define IOCFG_PORTID_I2S_AD0 0x00000025
81 #define IOCFG_PORTID_I2S_AD1 0x00000026
82 #define IOCFG_PORTID_I2S_WCLK 0x00000027
83 #define IOCFG_PORTID_I2S_BCLK 0x00000028
84 #define IOCFG_PORTID_I2S_MCLK 0x00000029
85 #define IOCFG_PORTID_RFC_TRC 0x0000002E
86 #define IOCFG_PORTID_RFC_GPO0 0x0000002F
87 #define IOCFG_PORTID_RFC_GPO1 0x00000030
88 #define IOCFG_PORTID_RFC_GPO2 0x00000031
89 #define IOCFG_PORTID_RFC_GPO3 0x00000032
90 #define IOCFG_PORTID_RFC_GPI0 0x00000033
91 #define IOCFG_PORTID_RFC_GPI1 0x00000034
92 #define IOCFG_PORTID_RFC_SMI_DL_OUT 0x00000035
93 #define IOCFG_PORTID_RFC_SMI_DL_IN 0x00000036
94 #define IOCFG_PORTID_RFC_SMI_CMD_OUT 0x00000037
95 #define IOCFG_PORTID_RFC_SMI_CMD_IN 0x00000038
97 #define IOCFG_IOSTR_AUTO 0x00000000
98 #define IOCFG_IOSTR_MAX 0x00000300
99 #define IOCFG_IOSTR_MED 0x00000200
100 #define IOCFG_IOSTR_MIN 0x00000100
102 #define IOCFG_IOCURR_2MA 0x00000000
103 #define IOCFG_IOCURR_4MA 0x00000400
104 #define IOCFG_IOCURR_8MA 0x00000800
105 #define IOCFG_IOCURR_16MA 0x00000C00
107 #define IOCFG_SLEW_RED 0x00001000
109 #define IOCFG_PULLCTL_OFF 0x00006000
110 #define IOCFG_PULLCTL_UP 0x00004000
111 #define IOCFG_PULLCTL_DOWN 0x00002000
113 #define IOCFG_EDGEDET_FALLING 0x00010000
114 #define IOCFG_EDGEDET_RISING 0x00020000
115 #define IOCFG_EDGEDET_BOTH 0x00030000
116 #define IOCFG_EDGEIRQ_ENABLE 0x00040000
118 /* n/a when port_id is AON or AUX */
119 #define IOCFG_IOMODE_INV 0x01000000
120 #define IOCFG_IOMODE_OPEN_DRAIN 0x04000000
121 #define IOCFG_IOMODE_OPEN_SRC 0x06000000
123 /* both enable waking up when port_id is AON or AUX */
124 #define IOCFG_WUCFG_LOW 0x10000000
125 #define IOCFG_WUCFG_HIGH 0x18000000
126 
127 /* ignored if port_id is AUX */
128 #define IOCFG_INPUT_ENABLE 0x20000000
129 
130 #define IOCFG_HYST_ENABLE 0x40000000
131 
137 #define AON_IOC_BASE (PERIPH_BASE + 0x94000)
143 typedef struct {
144  reg32_t IOSTRMIN;
145  reg32_t IOSTRMED;
146  reg32_t IOSTRMAX;
147  reg32_t IOCLATCH;
148  reg32_t CLK32KCTL;
149 } aon_regs_t;
150 
151 #define AON ((aon_regs_t *) (AON_IOC_BASE))
153 #define IOCLATCH_EN 0x00000001
155 #define CLK32KCTL_OEN 0x00000001
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 #endif /* CC26X0_IOC_H */
163 
reg32_t IOSTRMIN
IO drive strength minimum.
Definition: cc26x0_ioc.h:144
reg32_t CLK32KCTL
SCLK_LF external output control.
Definition: cc26x0_ioc.h:148
reg32_t IOSTRMED
IO drive strength medium.
Definition: cc26x0_ioc.h:145
reg32_t IOCLATCH
IO latch control.
Definition: cc26x0_ioc.h:147
reg32_t IOSTRMAX
IO drive strength maximum.
Definition: cc26x0_ioc.h:146
obtain IOCFG-register for a DIO
Definition: cc26x0_ioc.h:40
AON registers.
Definition: cc26x0_ioc.h:143
CC26x0 MCU interrupt definitions.