MCU/TIP
bitband 전달하여 함수에서 사용하기 ( 이중포인터 )
typedef uint32_t * const bitband_t; bitband_t pinPowerLed = BITBAND_PERIPH(&GPIOC->ODR, 15); bitband_t pinDispLed = BITBAND_PERIPH(&GPIOC->ODR, 14); u32** led_ar[2] = {0, 0}; void led_init(u8 index, u32** led) { if(index >= (sizeof(led_ar)/sizeof(u32)))return; led_ar[index] = led; } void led_task(void) { for(int i = 0; i < (sizeof(led_ar)/sizeof(u32)); i++) { if(led_ar) { (**led_ar[i])^= 1; } } ..
2022. 6. 30. 21:58