|
Contiki-Inga 3.x
|
cc2538 I/O Control Module More...
Files | |
| file | ioc.c |
| Implementation of IOC functions. | |
| file | ioc.h |
| Header file with declarations for the I/O Control module. | |
IOC Input Pin Select Registers | |
| #define | IOC_UARTRXD_UART0 0x400D4100 |
| UART0 RX. | |
| #define | IOC_UARTCTS_UART1 0x400D4104 |
| UART1 CTS. | |
| #define | IOC_UARTRXD_UART1 0x400D4108 |
| UART1 RX. | |
| #define | IOC_CLK_SSI_SSI0 0x400D410C |
| SSI0 Clock. | |
| #define | IOC_SSIRXD_SSI0 0x400D4110 |
| SSI0 RX. | |
| #define | IOC_SSIFSSIN_SSI0 0x400D4114 |
| SSI0 FSSIN. | |
| #define | IOC_CLK_SSIIN_SSI0 0x400D4118 |
| SSI0 Clock SSIIN. | |
| #define | IOC_CLK_SSI_SSI1 0x400D411C |
| SSI1 Clock. | |
| #define | IOC_SSIRXD_SSI1 0x400D4120 |
| SSI1 RX. | |
| #define | IOC_SSIFSSIN_SSI1 0x400D4124 |
| SSI1 FSSIN Select. | |
| #define | IOC_CLK_SSIIN_SSI1 0x400D4128 |
| SSI1 Clock SSIIN. | |
| #define | IOC_I2CMSSDA 0x400D412C |
| I2C SDA. | |
| #define | IOC_I2CMSSCL 0x400D4130 |
| I2C SCL. | |
| #define | IOC_GPT0OCP1 0x400D4134 |
| GPT0OCP1. | |
| #define | IOC_GPT0OCP2 0x400D4138 |
| GPT0OCP2. | |
| #define | IOC_GPT1OCP1 0x400D413C |
| GPT1OCP1. | |
| #define | IOC_GPT1OCP2 0x400D4140 |
| GPT1OCP2. | |
| #define | IOC_GPT2OCP1 0x400D4144 |
| GPT2OCP1. | |
| #define | IOC_GPT2OCP2 0x400D4148 |
| GPT2OCP2. | |
| #define | IOC_GPT3OCP1 0x400D414C |
| GPT3OCP1. | |
| #define | IOC_GPT3OCP2 0x400D4150 |
| GPT3OCP2. | |
I/O Control Register Bit Masks | |
| #define | IOC_OVR_MASK 0x0000000F |
| IOC_Pxn_OVER registers. | |
| #define | IOC_PXX_SEL_MASK 0x0000001F |
| IOC_Pxn_SEL registers. | |
| #define | IOC_INPUT_SEL_MASK 0x0000001F |
| All other IOC registers. | |
Values for IOC_PXX_OVER | |
| #define | IOC_OVERRIDE_OE 0x00000008 |
| Output Enable. | |
| #define | IOC_OVERRIDE_PUE 0x00000004 |
| Pull Up Enable. | |
| #define | IOC_OVERRIDE_PDE 0x00000002 |
| Pull Down Enable. | |
| #define | IOC_OVERRIDE_ANA 0x00000001 |
| Analog Enable. | |
| #define | IOC_OVERRIDE_DIS 0x00000000 |
| Override Disabled. | |
IOC Functions | |
| void | ioc_init () |
| Initialise the IOC driver. | |
| void | ioc_set_over (uint8_t port, uint8_t pin, uint8_t over) |
| Set Port:Pin override function. More... | |
| void | ioc_set_sel (uint8_t port, uint8_t pin, uint8_t sel) |
| Function select for Port:Pin. More... | |
| #define | ioc_input_sel(port, pin) ((port << 3) | pin) |
| Generates an IOC_INPUT_SEL_PXn value from a port/pin number. More... | |
cc2538 I/O Control Module
| #define ioc_input_sel | ( | port, | |
| pin | |||
| ) | ((port << 3) | pin) |
| void ioc_set_over | ( | uint8_t | port, |
| uint8_t | pin, | ||
| uint8_t | over | ||
| ) |
Set Port:Pin override function.
| port | The port as a number (PA: 0, PB: 1 etc) |
| pin | The pin as a number |
| over | The desired override configuration |
over can take the following values:
Definition at line 54 of file ioc.c.
Referenced by spi_init(), sys_ctrl_init(), and uart_init().
| void ioc_set_sel | ( | uint8_t | port, |
| uint8_t | pin, | ||
| uint8_t | sel | ||
| ) |
Function select for Port:Pin.
| port | The port as a number (PA: 0, PB: 1 etc) |
| pin | The pin as a number |
| sel | The desired function |
The value of sel can be any of the IOC_PXX_SEL_xyz defines. For example IOC_PXX_SEL_UART0_TXD will set the port to act as UART0 TX
Definition at line 60 of file ioc.c.
Referenced by spi_init(), and uart_init().
1.8.3.1