/*
 * main2.c
 *
 *  Created on: Oct 21, 2016
 *      Author: wn
 */

/*
 * 1. insert #include "main2.h" at USER CODE Includes of main.c
 * 2. insert my_setup_1(); at USER CODE 1 in main.c
 * 3. insert my_setup_2(); at USER CODE 2 in main.c
 * 4. insert my_loop(); at USER CODE 3 in main.c
 */



#include <stdlib.h>
#include <PontCoopScheduler.h>
#include "stm32f1xx_hal.h"

void blink(void *handle) {
	HAL_GPIO_TogglePin(LED_PIN_GPIO_Port, LED_PIN_Pin);

}

void my_setup_1() {
	schInit();
	schAdd(blink, NULL, 0, 1000);
}

void my_setup_2() {

}

void my_loop() {
	schExec();
}


void HAL_SYSTICK_Callback() {
	//HAL_GPIO_TogglePin(LED_PIN_GPIO_Port, LED_PIN_Pin);
	schUpdate();
}
