18#ifndef __VSF_LED_SCAN_H__
19#define __VSF_LED_SCAN_H__
25#if VSF_USE_LED_SCAN == ENABLED
30#if defined(__VSF_LED_SCAN_CLASS_IMPLEMENT)
31# undef __VSF_LED_SCAN_CLASS_IMPLEMENT
32# define __VSF_CLASS_IMPLEMENT__
44#define __describe_led_scan_led(__pin_set, __pin_clr) \
45 { .pin_set = (__pin_set), .pin_clr = (__pin_clr) }
46#define describe_led_scan_led(__pin_set, __pin_clr) \
47 __describe_led_scan_led((__pin_set), (__pin_clr))
49#define __describe_led_scan_hw(__name, __io_mapper, __led_num, ...) \
50 typedef struct VSF_MCONNECT(__, __name, _hw_t) { \
51 const vsf_io_mapper_t *io_mapper; \
53 vsf_led_scan_pin_t __pins[(__led_num)]; \
54 } VSF_MCONNECT(__, __name, _hw_t); \
55 const VSF_MCONNECT(__, __name, _hw_t) VSF_MCONNECT(__, __name, _hw) = { \
56 .io_mapper = (const vsf_io_mapper_t *)(__io_mapper), \
57 .led_num = (__led_num), \
62#define describe_led_scan_hw(__name, __io_mapper, __led_num, ...) \
63 __describe_led_scan_hw(__name, (__io_mapper), (__led_num), __VA_ARGS__)
65#define __describe_led_scan(__name, __io_mapper, __led_num, ...) \
66 describe_led_scan_hw(__name, (__io_mapper), (__led_num), __VA_ARGS__) \
67 vsf_led_scan_t __name = { \
68 .hw = (const vsf_led_scan_hw_t *)&VSF_MCONNECT(__, __name, _hw),\
70#define describe_led_scan(__name, __io_mapper, __led_num, ...) \
71 __describe_led_scan(__name, (__io_mapper), (__led_num), __VA_ARGS__)
Definition vsf_led_scan.h:86
unsigned int uint32_t
Definition lvgl.h:43
unsigned char uint8_t
Definition lvgl.h:40
#define vsf_class(__name)
Definition ooc_class.h:48
Definition vsf_led_scan.h:80
const vsf_io_mapper_t * io_mapper
Definition vsf_led_scan.h:81
uint8_t led_num
Definition vsf_led_scan.h:82
vsf_led_scan_pin_t pins[0]
Definition vsf_led_scan.h:83
Definition vsf_led_scan.h:75
uint8_t pin_set
Definition vsf_led_scan.h:76
uint8_t pin_clr
Definition vsf_led_scan.h:77
vk_av_control_value_t value
Definition vsf_audio.h:171
void vsf_led_scan_set_direction(vsf_led_scan_t *scan, uint32_t pin_mask, uint32_t direction_mask)
Definition vsf_led_scan.c:92
void vsf_led_scan_switch_direction(vsf_led_scan_t *scan, uint32_t pin_mask)
Definition vsf_led_scan.c:115
uint32_t vsf_led_scan_read(vsf_led_scan_t *scan)
Definition vsf_led_scan.c:130
void vsf_led_scan_set_input(vsf_led_scan_t *scan, uint32_t pin_mask)
Definition vsf_led_scan.c:120
void vsf_led_scan_config_pin(vsf_led_scan_t *scan, uint32_t pin_mask, uint32_t feature)
Definition vsf_led_scan.c:88
void vsf_led_scan_clear(vsf_led_scan_t *scan, uint32_t pin_mask)
Definition vsf_led_scan.c:148
void vsf_led_scan_set(vsf_led_scan_t *scan, uint32_t pin_mask)
Definition vsf_led_scan.c:142
void vsf_led_scan_write(vsf_led_scan_t *scan, uint32_t value, uint32_t pin_mask)
Definition vsf_led_scan.c:135
uint32_t vsf_led_scan_get_direction(vsf_led_scan_t *scan, uint32_t pin_mask)
Definition vsf_led_scan.c:110
void vsf_led_scan_set_output(vsf_led_scan_t *scan, uint32_t pin_mask)
Definition vsf_led_scan.c:125
void vsf_led_scan_toggle(vsf_led_scan_t *scan, uint32_t pin_mask)
Definition vsf_led_scan.c:153