Hallo,
ich versuche gerade das Signal "cpu_gpio_out5" nach "gpio0"zu mappen.
Das Bild (pin_remap.jpg) was im Anhang zu sehen ist sagt mir das ich die
Nummer "33" für das Signal "cpu_gpio_out5" dann in mein
"GPIO_FUNC0_OUT_SEL_CFG_REG" schreiben muss damit ich später das Signal
von GPIO5 an GPIO0 habe oder interpretiere ich das falsch?
1 | #define GPIO_BASE 0x60004000
|
2 | #define GPIO_REG(r) (GPIO_BASE + r)
|
3 | #define GPIO_FUNCx_OUT_SEL_CNFG_REG(n) (0x0554 + (4*n))
|
4 |
|
5 | //write value to register
|
6 | #define REG_WRITE(_r, _v) do { \
|
7 | (*(volatile uint32_t *)(_r)) = (_v); \
|
8 | } while(0)
|
9 |
|
10 | // cpu_gpio_out_5 an gpio0
|
11 | REG_WRITE( GPIO_REG( GPIO_FUNCx_OUT_SEL_CNFG_REG( 0 ) ), 33 | 1<<9 );
|
Gruß Jan