fast_io.h
Go to the documentation of this file.
11 * Support macros to perform GPIO as fast as possible by avoiding conditionals and accessing memory-mapped registers directly.
39 #define GP_SELECT(flag, value0, value1) (((value0) & (((flag)&1) - 1)) | ((value1) & ~(((flag)&1) - 1)))
55 #define GP_FAST_WRITE(pin, val, regclr, regset) (*(volatile uint32_t*)GP_SELECT(val, regclr, regset) = BIT(pin))