|
28 | 28 | /** and global signal table GPIO manipulation **/ |
29 | 29 | /**************************************************************/ |
30 | 30 |
|
31 | | -#define GENERIC_DEBUG_GPIO_SET(signal, table) do { \ |
32 | | - uint32_t debug_table_idx = 0; \ |
33 | | - if(signal >= sizeof(table)) \ |
34 | | - { \ |
35 | | - return; \ |
36 | | - } \ |
37 | | - debug_table_idx = table[signal]; \ |
38 | | - if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \ |
39 | | - { \ |
40 | | - HAL_GPIO_WritePin(general_debug_table[debug_table_idx].GPIO_port, \ |
41 | | - general_debug_table[debug_table_idx].GPIO_pin, \ |
42 | | - GPIO_PIN_SET); \ |
43 | | - } \ |
| 31 | +#define GENERIC_DEBUG_GPIO_SET(signal, table) do { \ |
| 32 | + uint32_t debug_table_idx = 0; \ |
| 33 | + if(signal >= sizeof(table)) \ |
| 34 | + { \ |
| 35 | + return; \ |
| 36 | + } \ |
| 37 | + debug_table_idx = table[signal]; \ |
| 38 | + if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \ |
| 39 | + { \ |
| 40 | + LL_GPIO_SetOutputPin(general_debug_table[debug_table_idx].GPIO_port, \ |
| 41 | + general_debug_table[debug_table_idx].GPIO_pin); \ |
| 42 | + } \ |
44 | 43 | } while(0) |
45 | 44 |
|
46 | | -#define GENERIC_DEBUG_GPIO_RESET(signal, table) do { \ |
47 | | - uint32_t debug_table_idx = 0; \ |
48 | | - if(signal >= sizeof(table)) \ |
49 | | - { \ |
50 | | - return; \ |
51 | | - } \ |
52 | | - debug_table_idx = table[signal]; \ |
53 | | - if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \ |
54 | | - { \ |
55 | | - HAL_GPIO_WritePin(general_debug_table[debug_table_idx].GPIO_port, \ |
56 | | - general_debug_table[debug_table_idx].GPIO_pin, \ |
57 | | - GPIO_PIN_RESET); \ |
58 | | - } \ |
| 45 | +#define GENERIC_DEBUG_GPIO_RESET(signal, table) do { \ |
| 46 | + uint32_t debug_table_idx = 0; \ |
| 47 | + if(signal >= sizeof(table)) \ |
| 48 | + { \ |
| 49 | + return; \ |
| 50 | + } \ |
| 51 | + debug_table_idx = table[signal]; \ |
| 52 | + if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \ |
| 53 | + { \ |
| 54 | + LL_GPIO_ResetOutputPin(general_debug_table[debug_table_idx].GPIO_port, \ |
| 55 | + general_debug_table[debug_table_idx].GPIO_pin); \ |
| 56 | + } \ |
59 | 57 | } while(0) |
60 | 58 |
|
61 | | -#define GENERIC_DEBUG_GPIO_TOGGLE(signal, table) do { \ |
62 | | - uint32_t debug_table_idx = 0; \ |
63 | | - if(signal >= sizeof(table)) \ |
64 | | - { \ |
65 | | - return; \ |
66 | | - } \ |
67 | | - debug_table_idx = table[signal]; \ |
68 | | - if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \ |
69 | | - { \ |
70 | | - HAL_GPIO_TogglePin(general_debug_table[debug_table_idx].GPIO_port, \ |
71 | | - general_debug_table[debug_table_idx].GPIO_pin); \ |
72 | | - } \ |
| 59 | +#define GENERIC_DEBUG_GPIO_TOGGLE(signal, table) do { \ |
| 60 | + uint32_t debug_table_idx = 0; \ |
| 61 | + if(signal >= sizeof(table)) \ |
| 62 | + { \ |
| 63 | + return; \ |
| 64 | + } \ |
| 65 | + debug_table_idx = table[signal]; \ |
| 66 | + if(debug_table_idx != RT_DEBUG_SIGNAL_UNUSED) \ |
| 67 | + { \ |
| 68 | + LL_GPIO_TogglePin(general_debug_table[debug_table_idx].GPIO_port, \ |
| 69 | + general_debug_table[debug_table_idx].GPIO_pin); \ |
| 70 | + } \ |
73 | 71 | } while(0) |
74 | 72 |
|
75 | 73 | #endif /* CFG_RT_DEBUG_GPIO_MODULE */ |
|
0 commit comments