Create UART-based AT commands library

This commit is contained in:
2020-11-18 22:39:59 +01:00
parent c2d77d5758
commit 0f2dca5ec7
8 changed files with 262 additions and 8 deletions

View File

@@ -19,6 +19,20 @@ void led_init(void)
TIMSK |= (1<<TOIE0);
}
void led_set_btness(uint8_t btness)
{
ram_cfg.led_brightness = (1<<btness);
if(!ram_cfg.led_brightness) ram_cfg.led_brightness = 1;
dump_ram2eem();
}
void led_inc_btness(void)
{
ram_cfg.led_brightness <<= 1;
if(!ram_cfg.led_brightness) ram_cfg.led_brightness = 1;
dump_ram2eem();
}
// 8 MHz / 256 = 31.25 kHz
ISR(TIMER0_OVF_vect)
{