Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename io_pin_tt>
- struct led{
- static inline void on(){
- io_pin_tt::set(1);
- }
- static inline void off(){
- io_pin_tt::set(0);
- }
- };
- using power_led = led<cpu::io::pin<13>>;
- using status_led = led<cpu::io::pin<1>>;
- //...
- power_led::on();
- if(blaaa)
- status_led::on();
- power_led::off
- //...
Advertisement
Add Comment
Please, Sign In to add comment