| 86 | } |
| 87 | |
| 88 | void delay(unsigned long ms) |
| 89 | { |
| 90 | fl::u16 start = (fl::u16)micros(); |
| 91 | |
| 92 | while (ms > 0) { |
| 93 | if (((fl::u16)micros() - start) >= 1000) { |
| 94 | --ms; |
| 95 | start += 1000; |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) |
| 101 | void init() |