Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ***********************************************************
- // test.c
- //
- // ***********************************************************
- #include "test.h"
- #include "../drivers.h"
- #include "../bsp.h"
- static void test_onTimer(void)
- {
- static bool State = false;
- if(Settings.Value1)
- {
- led_On(1);
- }
- else
- {
- led_Off(1);
- }
- if(State)
- {
- led_On(0);
- }
- else
- {
- led_Off(0);
- }
- State = !State;
- }
- void test_ResetSettings(void)
- {
- Settings.Value1 = false;
- }
- static void onButton(uint8_t Button)
- {
- Settings.Value1 = !Settings.Value1;
- settings_Save();
- }
- void test_Init(void)
- {
- timer_AddFunction(2, &test_onTimer);
- button_SetHandler(&onButton);
- }
- void test_Main(void)
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement