libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Defined Constants and Types for the EFM32HG GPIO module More...
Functions | |
void | gpio_enable_lock (void) |
Enable GPIO registers lock. More... | |
void | gpio_disable_lock (void) |
Disable GPIO registers lock. More... | |
bool | gpio_get_lock_flag (void) |
Get GPIO register lock flag. More... | |
void | gpio_set_drive_strength (uint32_t gpio_port, enum gpio_drive_strength driver_stength) |
Set port pins drive strength. More... | |
void | gpio_mode_setup (uint32_t gpio_port, enum gpio_mode mode, uint16_t gpios) |
Set port pins mode. More... | |
void | gpio_set (uint32_t gpio_port, uint16_t gpios) |
Set port pins output value (Atomic) More... | |
void | gpio_clear (uint32_t gpio_port, uint16_t gpios) |
Set port pins output value (Atomic) More... | |
uint16_t | gpio_get (uint32_t gpio_port, uint16_t gpios) |
Get port pins input value. More... | |
void | gpio_toggle (uint32_t gpio_port, uint16_t gpios) |
Toggle port pins output value (Atomic) More... | |
uint16_t | gpio_port_read (uint32_t gpio_port) |
Get port (all) input value's. More... | |
void | gpio_port_write (uint32_t gpio_port, uint16_t data) |
Set port (all) output value's. More... | |
void | gpio_port_config_lock (uint32_t gpio_port, uint16_t gpios) |
Lock the Configuration of a Group of Pins. More... | |
Defined Constants and Types for the EFM32HG GPIO module
LGPL License Terms libopencm3 License
#define GPIO0 (1 << 0) |
Definition at line 252 of file gpio_common_hglg.h.
#define GPIO1 (1 << 1) |
Definition at line 253 of file gpio_common_hglg.h.
#define GPIO10 (1 << 10) |
Definition at line 262 of file gpio_common_hglg.h.
#define GPIO11 (1 << 11) |
Definition at line 263 of file gpio_common_hglg.h.
#define GPIO12 (1 << 12) |
Definition at line 264 of file gpio_common_hglg.h.
#define GPIO13 (1 << 13) |
Definition at line 265 of file gpio_common_hglg.h.
#define GPIO14 (1 << 14) |
Definition at line 266 of file gpio_common_hglg.h.
#define GPIO15 (1 << 15) |
Definition at line 267 of file gpio_common_hglg.h.
#define GPIO2 (1 << 2) |
Definition at line 254 of file gpio_common_hglg.h.
#define GPIO3 (1 << 3) |
Definition at line 255 of file gpio_common_hglg.h.
#define GPIO4 (1 << 4) |
Definition at line 256 of file gpio_common_hglg.h.
#define GPIO5 (1 << 5) |
Definition at line 257 of file gpio_common_hglg.h.
#define GPIO6 (1 << 6) |
Definition at line 258 of file gpio_common_hglg.h.
#define GPIO7 (1 << 7) |
Definition at line 259 of file gpio_common_hglg.h.
#define GPIO8 (1 << 8) |
Definition at line 260 of file gpio_common_hglg.h.
#define GPIO9 (1 << 9) |
Definition at line 261 of file gpio_common_hglg.h.
#define GPIO_ALL (0xFFFF) |
Definition at line 268 of file gpio_common_hglg.h.
Definition at line 184 of file gpio_common_hglg.h.
#define GPIO_CMD_EM4WUCLR (1 << 0) |
Definition at line 236 of file gpio_common_hglg.h.
Definition at line 183 of file gpio_common_hglg.h.
#define GPIO_CTRL_EM4RET (1 << 0) |
Definition at line 234 of file gpio_common_hglg.h.
Definition at line 187 of file gpio_common_hglg.h.
Definition at line 185 of file gpio_common_hglg.h.
#define GPIO_EM4WUEN_EM4WUEN_A0 (1 << 0) |
Definition at line 238 of file gpio_common_hglg.h.
#define GPIO_EM4WUEN_EM4WUEN_A6 (1 << 1) |
Definition at line 239 of file gpio_common_hglg.h.
#define GPIO_EM4WUEN_EM4WUEN_C9 (1 << 2) |
Definition at line 240 of file gpio_common_hglg.h.
#define GPIO_EM4WUEN_EM4WUEN_E13 (1 << 5) |
Definition at line 243 of file gpio_common_hglg.h.
#define GPIO_EM4WUEN_EM4WUEN_F1 (1 << 3) |
Definition at line 241 of file gpio_common_hglg.h.
#define GPIO_EM4WUEN_EM4WUEN_F2 (1 << 4) |
Definition at line 242 of file gpio_common_hglg.h.
Definition at line 186 of file gpio_common_hglg.h.
#define GPIO_EM4WUPOL_EM4WUPOL_A0 (1 << 0) |
Definition at line 245 of file gpio_common_hglg.h.
#define GPIO_EM4WUPOL_EM4WUPOL_A6 (1 << 1) |
Definition at line 246 of file gpio_common_hglg.h.
#define GPIO_EM4WUPOL_EM4WUPOL_C9 (1 << 2) |
Definition at line 247 of file gpio_common_hglg.h.
#define GPIO_EM4WUPOL_EM4WUPOL_E13 (1 << 5) |
Definition at line 250 of file gpio_common_hglg.h.
#define GPIO_EM4WUPOL_EM4WUPOL_F1 (1 << 3) |
Definition at line 248 of file gpio_common_hglg.h.
#define GPIO_EM4WUPOL_EM4WUPOL_F2 (1 << 4) |
Definition at line 249 of file gpio_common_hglg.h.
Definition at line 175 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_MASK | ( | n | ) | (0x7 << ((n) & 0xF)) |
Definition at line 190 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_PORTA 0x0 |
Definition at line 192 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_PORTB 0x1 |
Definition at line 193 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_PORTC 0x2 |
Definition at line 194 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_PORTD 0x3 |
Definition at line 195 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_PORTE 0x4 |
Definition at line 196 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_PORTF 0x5 |
Definition at line 197 of file gpio_common_hglg.h.
#define GPIO_EXTIPSEL_PORTMASK | ( | n, | |
v | |||
) | ((v) << ((n) & 0xF)) |
Definition at line 191 of file gpio_common_hglg.h.
Definition at line 173 of file gpio_common_hglg.h.
Definition at line 172 of file gpio_common_hglg.h.
Definition at line 174 of file gpio_common_hglg.h.
Definition at line 176 of file gpio_common_hglg.h.
Definition at line 177 of file gpio_common_hglg.h.
Definition at line 179 of file gpio_common_hglg.h.
Definition at line 178 of file gpio_common_hglg.h.
Definition at line 181 of file gpio_common_hglg.h.
#define GPIO_INSENSE_INT (1 << 0) |
Definition at line 224 of file gpio_common_hglg.h.
#define GPIO_INSENSE_PRS (1 << 1) |
Definition at line 225 of file gpio_common_hglg.h.
Definition at line 182 of file gpio_common_hglg.h.
#define GPIO_LOCK_LOCKKEY_LOCK (0x0000 << GPIO_LOCK_LOCKKEY_SHIFT) |
Definition at line 231 of file gpio_common_hglg.h.
#define GPIO_LOCK_LOCKKEY_LOCKED (0x0001 << GPIO_LOCK_LOCKKEY_SHIFT) |
Definition at line 230 of file gpio_common_hglg.h.
#define GPIO_LOCK_LOCKKEY_MASK (0xFFFF << GPIO_LOCK_LOCKKEY_SHIFT) |
Definition at line 228 of file gpio_common_hglg.h.
#define GPIO_LOCK_LOCKKEY_SHIFT (0) |
Definition at line 227 of file gpio_common_hglg.h.
#define GPIO_LOCK_LOCKKEY_UNLOCK (0xA534 << GPIO_LOCK_LOCKKEY_SHIFT) |
Definition at line 232 of file gpio_common_hglg.h.
#define GPIO_LOCK_LOCKKEY_UNLOCKED (0x0000 << GPIO_LOCK_LOCKKEY_SHIFT) |
Definition at line 229 of file gpio_common_hglg.h.
#define GPIO_P | ( | i | ) | (GPIO_BASE + (0x24 * (i))) |
Definition at line 29 of file gpio_common_hglg.h.
#define GPIO_P_CTRL | ( | port | ) | MMIO32((port) + 0x00) |
Definition at line 37 of file gpio_common_hglg.h.
#define GPIO_P_CTRL_DRIVEMODE | ( | v | ) | (((v) << GPIO_P_CTRL_DRIVEMODE_SHIFT) & GPIO_P_CTRL_DRIVEMODE_MASK) |
Definition at line 47 of file gpio_common_hglg.h.
#define GPIO_P_CTRL_DRIVEMODE_HIGH GPIO_P_CTRL_DRIVEMODE(2) |
Definition at line 51 of file gpio_common_hglg.h.
#define GPIO_P_CTRL_DRIVEMODE_LOW GPIO_P_CTRL_DRIVEMODE(3) |
Definition at line 52 of file gpio_common_hglg.h.
#define GPIO_P_CTRL_DRIVEMODE_LOWEST GPIO_P_CTRL_DRIVEMODE(1) |
Definition at line 50 of file gpio_common_hglg.h.
#define GPIO_P_CTRL_DRIVEMODE_MASK (0x03 << GPIO_P_CTRL_DRIVEMODE_SHIFT) |
Definition at line 46 of file gpio_common_hglg.h.
#define GPIO_P_CTRL_DRIVEMODE_SHIFT (0) |
Definition at line 45 of file gpio_common_hglg.h.
#define GPIO_P_CTRL_DRIVEMODE_STANDARD GPIO_P_CTRL_DRIVEMODE(0) |
Definition at line 49 of file gpio_common_hglg.h.
#define GPIO_P_DIN | ( | port | ) | MMIO32((port) + 0x1C) |
Definition at line 158 of file gpio_common_hglg.h.
#define GPIO_P_DOUT | ( | port | ) | MMIO32((port) + 0x0C) |
Definition at line 130 of file gpio_common_hglg.h.
#define GPIO_P_DOUTCLR | ( | port | ) | MMIO32((port) + 0x14) |
Definition at line 144 of file gpio_common_hglg.h.
#define GPIO_P_DOUTSET | ( | port | ) | MMIO32((port) + 0x10) |
Definition at line 137 of file gpio_common_hglg.h.
#define GPIO_P_DOUTTGL | ( | port | ) | MMIO32((port) + 0x18) |
Definition at line 151 of file gpio_common_hglg.h.
#define GPIO_P_MODE_MODEx | ( | x, | |
mode | |||
) | (((mode) << (((x) & 0x7) * 4)) & GPIO_P_MODE_MODEx_MASK(x)) |
Definition at line 58 of file gpio_common_hglg.h.
#define GPIO_P_MODE_MODEx_MASK | ( | x | ) | (0x0F << (((x) & 0x7) * 4)) |
Definition at line 56 of file gpio_common_hglg.h.
#define GPIO_P_MODEH | ( | port | ) | MMIO32((port) + 0x08) |
Definition at line 95 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE10 | ( | mode | ) | GPIO_P_MODEH_MODEx(10, mode) |
Definition at line 113 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE10_MASK GPIO_P_MODEH_MODEx_MASK(10) |
Definition at line 112 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE11 | ( | mode | ) | GPIO_P_MODEH_MODEx(11, mode) |
Definition at line 116 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE11_MASK GPIO_P_MODEH_MODEx_MASK(11) |
Definition at line 115 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE12 | ( | mode | ) | GPIO_P_MODEH_MODEx(12, mode) |
Definition at line 119 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE12_MASK GPIO_P_MODEH_MODEx_MASK(12) |
Definition at line 118 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE13 | ( | mode | ) | GPIO_P_MODEH_MODEx(13, mode) |
Definition at line 122 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE13_MASK GPIO_P_MODEH_MODEx_MASK(13) |
Definition at line 121 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE14 | ( | mode | ) | GPIO_P_MODEH_MODEx(14, mode) |
Definition at line 125 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE14_MASK GPIO_P_MODEH_MODEx_MASK(14) |
Definition at line 124 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE15 | ( | mode | ) | GPIO_P_MODEH_MODEx(15, mode) |
Definition at line 128 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE15_MASK GPIO_P_MODEH_MODEx_MASK(15) |
Definition at line 127 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE8 | ( | mode | ) | GPIO_P_MODEH_MODEx(8, mode) |
Definition at line 107 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE8_MASK GPIO_P_MODEH_MODEx_MASK(8) |
Definition at line 106 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE9 | ( | mode | ) | GPIO_P_MODEH_MODEx(9, mode) |
Definition at line 110 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODE9_MASK GPIO_P_MODEH_MODEx_MASK(9) |
Definition at line 109 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODEx | ( | x, | |
mode | |||
) | GPIO_P_MODE_MODEx((x) - 8, mode) |
Definition at line 104 of file gpio_common_hglg.h.
#define GPIO_P_MODEH_MODEx_MASK | ( | x | ) | GPIO_P_MODE_MODEx_MASK((x) - 8) |
Definition at line 103 of file gpio_common_hglg.h.
#define GPIO_P_MODEL | ( | port | ) | MMIO32((port) + 0x04) |
Definition at line 61 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE0 | ( | mode | ) | GPIO_P_MODEL_MODEx(0, mode) |
Definition at line 72 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE0_MASK GPIO_P_MODEL_MODEx_MASK(0) |
Definition at line 71 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE1 | ( | mode | ) | GPIO_P_MODEL_MODEx(1, mode) |
Definition at line 75 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE1_MASK GPIO_P_MODEL_MODEx_MASK(1) |
Definition at line 74 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE2 | ( | mode | ) | GPIO_P_MODEL_MODEx(2, mode) |
Definition at line 78 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE2_MASK GPIO_P_MODEL_MODEx_MASK(2) |
Definition at line 77 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE3 | ( | mode | ) | GPIO_P_MODEL_MODEx(3, mode) |
Definition at line 81 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE3_MASK GPIO_P_MODEL_MODEx_MASK(3) |
Definition at line 80 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE4 | ( | mode | ) | GPIO_P_MODEL_MODEx(4, mode) |
Definition at line 84 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE4_MASK GPIO_P_MODEL_MODEx_MASK(4) |
Definition at line 83 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE5 | ( | mode | ) | GPIO_P_MODEL_MODEx(5, mode) |
Definition at line 87 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE5_MASK GPIO_P_MODEL_MODEx_MASK(5) |
Definition at line 86 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE6 | ( | mode | ) | GPIO_P_MODEL_MODEx(6, mode) |
Definition at line 90 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE6_MASK GPIO_P_MODEL_MODEx_MASK(6) |
Definition at line 89 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE7 | ( | mode | ) | GPIO_P_MODEL_MODEx(7, mode) |
Definition at line 93 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODE7_MASK GPIO_P_MODEL_MODEx_MASK(7) |
Definition at line 92 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODEx | ( | x, | |
mode | |||
) | GPIO_P_MODE_MODEx(x, mode) |
Definition at line 69 of file gpio_common_hglg.h.
#define GPIO_P_MODEL_MODEx_MASK | ( | x | ) | GPIO_P_MODE_MODEx_MASK(x) |
Definition at line 68 of file gpio_common_hglg.h.
#define GPIO_P_PINLOCKN | ( | port | ) | MMIO32((port) + 0x20) |
Definition at line 165 of file gpio_common_hglg.h.
#define GPIO_PA GPIO_P(0) |
Definition at line 30 of file gpio_common_hglg.h.
#define GPIO_PA_CTRL GPIO_P_CTRL(GPIO_PA) |
Definition at line 38 of file gpio_common_hglg.h.
#define GPIO_PA_DIN GPIO_P_DIN(GPIO_PA) |
Definition at line 159 of file gpio_common_hglg.h.
#define GPIO_PA_DOUT GPIO_P_DOUT(GPIO_PA) |
Definition at line 131 of file gpio_common_hglg.h.
#define GPIO_PA_DOUTCLR GPIO_P_DOUTCLR(GPIO_PA) |
Definition at line 145 of file gpio_common_hglg.h.
#define GPIO_PA_DOUTSET GPIO_P_DOUTSET(GPIO_PA) |
Definition at line 138 of file gpio_common_hglg.h.
#define GPIO_PA_DOUTTGL GPIO_P_DOUTTGL(GPIO_PA) |
Definition at line 152 of file gpio_common_hglg.h.
#define GPIO_PA_MODEH GPIO_P_MODEH(GPIO_PA) |
Definition at line 96 of file gpio_common_hglg.h.
#define GPIO_PA_MODEL GPIO_P_MODEL(GPIO_PA) |
Definition at line 62 of file gpio_common_hglg.h.
#define GPIO_PA_PINLOCKN GPIO_P_PINLOCKN(GPIO_PA) |
Definition at line 166 of file gpio_common_hglg.h.
#define GPIO_PB GPIO_P(1) |
Definition at line 31 of file gpio_common_hglg.h.
#define GPIO_PB_CTRL GPIO_P_CTRL(GPIO_PB) |
Definition at line 39 of file gpio_common_hglg.h.
#define GPIO_PB_DIN GPIO_P_DIN(GPIO_PB) |
Definition at line 160 of file gpio_common_hglg.h.
#define GPIO_PB_DOUT GPIO_P_DOUT(GPIO_PB) |
Definition at line 132 of file gpio_common_hglg.h.
#define GPIO_PB_DOUTCLR GPIO_P_DOUTCLR(GPIO_PB) |
Definition at line 146 of file gpio_common_hglg.h.
#define GPIO_PB_DOUTSET GPIO_P_DOUTSET(GPIO_PB) |
Definition at line 139 of file gpio_common_hglg.h.
#define GPIO_PB_DOUTTGL GPIO_P_DOUTTGL(GPIO_PB) |
Definition at line 153 of file gpio_common_hglg.h.
#define GPIO_PB_MODEH GPIO_P_MODEH(GPIO_PB) |
Definition at line 97 of file gpio_common_hglg.h.
#define GPIO_PB_MODEL GPIO_P_MODEL(GPIO_PB) |
Definition at line 63 of file gpio_common_hglg.h.
#define GPIO_PB_PINLOCKN GPIO_P_PINLOCKN(GPIO_PB) |
Definition at line 167 of file gpio_common_hglg.h.
#define GPIO_PC GPIO_P(2) |
Definition at line 32 of file gpio_common_hglg.h.
#define GPIO_PC_CTRL GPIO_P_CTRL(GPIO_PC) |
Definition at line 40 of file gpio_common_hglg.h.
#define GPIO_PC_DIN GPIO_P_DIN(GPIO_PC) |
Definition at line 161 of file gpio_common_hglg.h.
#define GPIO_PC_DOUT GPIO_P_DOUT(GPIO_PC) |
Definition at line 133 of file gpio_common_hglg.h.
#define GPIO_PC_DOUTCLR GPIO_P_DOUTCLR(GPIO_PC) |
Definition at line 147 of file gpio_common_hglg.h.
#define GPIO_PC_DOUTSET GPIO_P_DOUTSET(GPIO_PC) |
Definition at line 140 of file gpio_common_hglg.h.
#define GPIO_PC_DOUTTGL GPIO_P_DOUTTGL(GPIO_PC) |
Definition at line 154 of file gpio_common_hglg.h.
#define GPIO_PC_MODEH GPIO_P_MODEH(GPIO_PC) |
Definition at line 98 of file gpio_common_hglg.h.
#define GPIO_PC_MODEL GPIO_P_MODEL(GPIO_PC) |
Definition at line 64 of file gpio_common_hglg.h.
#define GPIO_PC_PINLOCKN GPIO_P_PINLOCKN(GPIO_PC) |
Definition at line 168 of file gpio_common_hglg.h.
#define GPIO_PD GPIO_P(3) |
Definition at line 33 of file gpio_common_hglg.h.
#define GPIO_PD_CTRL GPIO_P_CTRL(GPIO_PD) |
Definition at line 41 of file gpio_common_hglg.h.
#define GPIO_PD_DIN GPIO_P_DIN(GPIO_PD) |
Definition at line 162 of file gpio_common_hglg.h.
#define GPIO_PD_DOUT GPIO_P_DOUT(GPIO_PD) |
Definition at line 134 of file gpio_common_hglg.h.
#define GPIO_PD_DOUTCLR GPIO_P_DOUTCLR(GPIO_PD) |
Definition at line 148 of file gpio_common_hglg.h.
#define GPIO_PD_DOUTSET GPIO_P_DOUTSET(GPIO_PD) |
Definition at line 141 of file gpio_common_hglg.h.
#define GPIO_PD_DOUTTGL GPIO_P_DOUTTGL(GPIO_PD) |
Definition at line 155 of file gpio_common_hglg.h.
#define GPIO_PD_MODEH GPIO_P_MODEH(GPIO_PD) |
Definition at line 99 of file gpio_common_hglg.h.
#define GPIO_PD_MODEL GPIO_P_MODEL(GPIO_PD) |
Definition at line 65 of file gpio_common_hglg.h.
#define GPIO_PD_PINLOCKN GPIO_P_PINLOCKN(GPIO_PD) |
Definition at line 169 of file gpio_common_hglg.h.
#define GPIO_PE GPIO_P(4) |
Definition at line 34 of file gpio_common_hglg.h.
#define GPIO_PE_CTRL GPIO_P_CTRL(GPIO_PE) |
Definition at line 42 of file gpio_common_hglg.h.
#define GPIO_PE_DIN GPIO_P_DIN(GPIO_PE) |
Definition at line 163 of file gpio_common_hglg.h.
#define GPIO_PE_DOUT GPIO_P_DOUT(GPIO_PE) |
Definition at line 135 of file gpio_common_hglg.h.
#define GPIO_PE_DOUTCLR GPIO_P_DOUTCLR(GPIO_PE) |
Definition at line 149 of file gpio_common_hglg.h.
#define GPIO_PE_DOUTSET GPIO_P_DOUTSET(GPIO_PE) |
Definition at line 142 of file gpio_common_hglg.h.
#define GPIO_PE_DOUTTGL GPIO_P_DOUTTGL(GPIO_PE) |
Definition at line 156 of file gpio_common_hglg.h.
#define GPIO_PE_MODEH GPIO_P_MODEH(GPIO_PE) |
Definition at line 100 of file gpio_common_hglg.h.
#define GPIO_PE_MODEL GPIO_P_MODEL(GPIO_PE) |
Definition at line 66 of file gpio_common_hglg.h.
#define GPIO_PE_PINLOCKN GPIO_P_PINLOCKN(GPIO_PE) |
Definition at line 170 of file gpio_common_hglg.h.
#define GPIO_PF GPIO_P(5) |
Definition at line 35 of file gpio_common_hglg.h.
#define GPIO_PF_CTRL GPIO_P_CTRL(GPIO_PF) |
Definition at line 43 of file gpio_common_hglg.h.
Definition at line 180 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION | ( | v | ) | (((v) << GPIO_ROUTE_ETMLOCATION_SHIFT) & GPIO_ROUTE_ETMLOCATION_MASK) |
Definition at line 216 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION_LOC0 GPIO_ROUTE_ETMLOCATION_LOCx(0) |
Definition at line 219 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION_LOC1 GPIO_ROUTE_ETMLOCATION_LOCx(1) |
Definition at line 220 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION_LOC2 GPIO_ROUTE_ETMLOCATION_LOCx(2) |
Definition at line 221 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION_LOC3 GPIO_ROUTE_ETMLOCATION_LOCx(3) |
Definition at line 222 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION_LOCx | ( | x | ) | GPIO_ROUTE_ETMLOCATION(x) |
Definition at line 218 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION_MASK (0x3 << GPIO_ROUTE_ETMLOCATION_SHIFT) |
Definition at line 215 of file gpio_common_hglg.h.
#define GPIO_ROUTE_ETMLOCATION_SHIFT (24) |
Definition at line 214 of file gpio_common_hglg.h.
#define GPIO_ROUTE_SWCLKPEN (1 << 0) |
Definition at line 199 of file gpio_common_hglg.h.
#define GPIO_ROUTE_SWDIOPEN (1 << 1) |
Definition at line 200 of file gpio_common_hglg.h.
#define GPIO_ROUTE_SWLOCATION | ( | v | ) | (((v) << GPIO_ROUTE_SWLOCATION_SHIFT) & GPIO_ROUTE_SWLOCATION_MASK) |
Definition at line 205 of file gpio_common_hglg.h.
#define GPIO_ROUTE_SWLOCATION_MASK (0x3 << GPIO_ROUTE_SWLOCATION_SHIFT) |
Definition at line 204 of file gpio_common_hglg.h.
#define GPIO_ROUTE_SWLOCATION_SHIFT (8) |
Definition at line 203 of file gpio_common_hglg.h.
#define GPIO_ROUTE_SWOPEN (1 << 3) |
Definition at line 201 of file gpio_common_hglg.h.
#define GPIO_ROUTE_TCLKPEN (1 << 12) |
Definition at line 208 of file gpio_common_hglg.h.
#define GPIO_ROUTE_TD0PEN (1 << 13) |
Definition at line 209 of file gpio_common_hglg.h.
#define GPIO_ROUTE_TD1PEN (1 << 14) |
Definition at line 210 of file gpio_common_hglg.h.
#define GPIO_ROUTE_TD2PEN (1 << 15) |
Definition at line 211 of file gpio_common_hglg.h.
#define GPIO_ROUTE_TD3PEN (1 << 16) |
Definition at line 212 of file gpio_common_hglg.h.
#define GPIOA GPIO_PA |
Definition at line 302 of file gpio_common_hglg.h.
#define GPIOB GPIO_PB |
Definition at line 303 of file gpio_common_hglg.h.
#define GPIOC GPIO_PC |
Definition at line 304 of file gpio_common_hglg.h.
#define GPIOD GPIO_PD |
Definition at line 305 of file gpio_common_hglg.h.
#define GPIOE GPIO_PE |
Definition at line 306 of file gpio_common_hglg.h.
#define GPIOF GPIO_PF |
Definition at line 307 of file gpio_common_hglg.h.
enum gpio_drive_strength |
Enumerator | |
---|---|
GPIO_STRENGTH_STANDARD | |
GPIO_STRENGTH_LOWEST | |
GPIO_STRENGTH_HIGH | |
GPIO_STRENGTH_LOW |
Definition at line 294 of file gpio_common_hglg.h.
enum gpio_mode |
Definition at line 274 of file gpio_common_hglg.h.
void gpio_clear | ( | uint32_t | gpio_port, |
uint16_t | gpios | ||
) |
Set port pins output value (Atomic)
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | gpios | (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL, use bitwise OR '|' to separate) |
Definition at line 118 of file gpio_common.c.
References GPIO_P_DOUTCLR.
void gpio_disable_lock | ( | void | ) |
Disable GPIO registers lock.
Definition at line 42 of file gpio_common.c.
References GPIO_LOCK, and GPIO_LOCK_LOCKKEY_UNLOCK.
void gpio_enable_lock | ( | void | ) |
Enable GPIO registers lock.
Definition at line 32 of file gpio_common.c.
References GPIO_LOCK, and GPIO_LOCK_LOCKKEY_LOCK.
uint16_t gpio_get | ( | uint32_t | gpio_port, |
uint16_t | gpios | ||
) |
Get port pins input value.
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | gpios | (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL, use bitwise OR '|' to separate) |
Definition at line 130 of file gpio_common.c.
References GPIO_P_DIN.
bool gpio_get_lock_flag | ( | void | ) |
Get GPIO register lock flag.
true | if flag is set |
false | if flag is not set |
Definition at line 54 of file gpio_common.c.
References GPIO_LOCK, GPIO_LOCK_LOCKKEY_LOCKED, and GPIO_LOCK_LOCKKEY_MASK.
void gpio_mode_setup | ( | uint32_t | gpio_port, |
enum gpio_mode | mode, | ||
uint16_t | gpios | ||
) |
Set port pins mode.
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | mode | Mode (use GPIO_MODE_*) |
[in] | gpios | (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL, use bitwise OR '|' to separate) |
Definition at line 78 of file gpio_common.c.
References GPIO_P_MODE_MODEx, GPIO_P_MODEH, and GPIO_P_MODEL.
void gpio_port_config_lock | ( | uint32_t | gpio_port, |
uint16_t | gpios | ||
) |
Lock the Configuration of a Group of Pins.
The configuration of one or more pins of the given GPIO port is locked. There is no mechanism to unlock these via software. Unlocking occurs at the next reset.
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | gpios | (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL, use bitwise OR '|' to separate) |
Definition at line 177 of file gpio_common.c.
References GPIO_P_PINLOCKN.
uint16_t gpio_port_read | ( | uint32_t | gpio_port | ) |
Get port (all) input value's.
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
Definition at line 151 of file gpio_common.c.
References GPIO_P_DIN.
void gpio_port_write | ( | uint32_t | gpio_port, |
uint16_t | data | ||
) |
Set port (all) output value's.
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | data | Data (all pins output value) |
Definition at line 161 of file gpio_common.c.
References GPIO_P_DOUT.
void gpio_set | ( | uint32_t | gpio_port, |
uint16_t | gpios | ||
) |
Set port pins output value (Atomic)
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | gpios | (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL, use bitwise OR '|' to separate) |
Definition at line 107 of file gpio_common.c.
References GPIO_P_DOUTSET.
void gpio_set_drive_strength | ( | uint32_t | gpio_port, |
enum gpio_drive_strength | drive_stength | ||
) |
Set port pins drive strength.
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | drive_stength | Driver Stength (use GPIO_STENGTH_*) |
Definition at line 65 of file gpio_common.c.
References GPIO_P_CTRL, and GPIO_P_CTRL_DRIVEMODE.
void gpio_toggle | ( | uint32_t | gpio_port, |
uint16_t | gpios | ||
) |
Toggle port pins output value (Atomic)
[in] | gpio_port | GPIO Port (use GPIO* ex. GPIOA, GPIOB, ....) |
[in] | gpios | (pins mask (use GPIO* ex . GPIO0, GPIO1 .... GPIO_ALL, use bitwise OR '|' to separate) |
Definition at line 141 of file gpio_common.c.
References GPIO_P_DOUTTGL.