#pragma once /* Easily turn on and off the system-led. */ #include "ch573/gpio.h" static inline void enable_sysled() { CH573_GPIO__GPIO_PORT_T_INTF.dir.set(ch573_gpio__gpio_port_a, DIR_OUT, 8); CH573_GPIO__GPIO_PORT_T_INTF.pd_drv.set(ch573_gpio__gpio_port_a, 0, 8); } // If "on" then turn on the sysled (which counter-intuitively means turning off // the GPIO). static inline void set_sysled(int on) { // CH573_GPIO__GPIO_PORT_T_INTF.out.set( // ch573_gpio__gpio_port_a, on ? OFF : ON, 8); }