diff options
author | Oxore <oxore@protonmail.com> | 2023-03-05 20:20:45 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-03-05 20:20:45 +0300 |
commit | ea807de65b0485ac58b6eae576209c64d4d5c4e9 (patch) | |
tree | b4264d20e1d700cfd9e0ece9d847a825dd1dfc03 /app/light_sensor/light_sensor_task.h | |
parent | dd01e7ed22cea652061f0d12cecf929e04b285e9 (diff) |
Split app code and third party libraries
Diffstat (limited to 'app/light_sensor/light_sensor_task.h')
-rw-r--r-- | app/light_sensor/light_sensor_task.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/light_sensor/light_sensor_task.h b/app/light_sensor/light_sensor_task.h new file mode 100644 index 0000000..65dbba9 --- /dev/null +++ b/app/light_sensor/light_sensor_task.h @@ -0,0 +1,24 @@ +#ifndef LIGHT_SENSOR_TASK_INCLUDED +#define LIGHT_SENSOR_TASK_INCLUDED + +#include "stm32f0xx_conf.h" + +#define LIGHT_SENSOR_GPIO_PINx GPIO_Pin_6 +#define LIGHT_SENSOR_GPIOx GPIOA +#define LIGHT_SENSOR_RCC_AHBPeriph_GPIOx RCC_AHBPeriph_GPIOA + +#define LIGHT_SENSOR_ADCx ADC1 +#define LIGHT_SENSOR_ADC_Channelx ADC_Channel_6 +#define LIGHT_SENSOR_RCC_APBxPeriphClockCmd RCC_APB2PeriphClockCmd +#define LIGHT_SENSOR_RCC_APBxPeriph_ADCx RCC_APB2Periph_ADC1 + +typedef enum { + LIGHT_SENSOR_STATE_LIGHT, + LIGHT_SENSOR_STATE_DARK +} LightSensorState_t; + +void LightSensorInit ( void ); + +void LightSensor_Task ( void *pvParameters ); + +#endif //LIGHT_SENSOR_TASK_INCLUDED |