37 template<
typename arg_pin,
int flavour = arg_pin::type >
41 ( flavour == bmptk::type_pin_out )
42 | ( flavour == bmptk::type_pin_in_out )
43 | ( flavour == bmptk::type_pin_oc ),
44 "blink requires a pin_out, pin_in_out or a pin_oc"
58 template<
typename arg_pin,
int flavour = arg_pin::type >
60 unsigned long long int period = 1 *
bmptk::ms,
61 unsigned long long int duration = 500 *
bmptk::ms
65 ( flavour == bmptk::type_pin_out )
66 | ( flavour == bmptk::type_pin_in_out )
67 | ( flavour == bmptk::type_pin_oc ),
68 "beep requires a pin_out, pin_in_out or a pin_oc"
74 while( duration > period ){
85 template<
typename arg_port,
int flavour = arg_port::type >
89 ( flavour == bmptk::type_port_out )
90 | ( flavour == bmptk::type_port_in_out )
91 | ( flavour == bmptk::type_port_oc ),
92 "kitt requires a port_out, port_in_out or a port_oc"
101 for(
int i = 0; i < port::n_pins(); i++ ){
102 port::set( 0x01 << i );
107 for(
int i = port::n_pins() - 2; i > 0; i-- ){
108 port::set( 0x01 << i );