Appiko
|
Module to keep track of operational conditions (i.e. Time of day, ambient light) of Appiko device. More...
Data Structures | |
struct | oper_manage_slot_t |
Macros | |
#define | OPER_MANAGE_MAX_SLOTS 8 |
#define | OPER_MANAGE_INVALID_SLOTS 0xFF |
Enumerations | |
enum | oper_list_t { OPER_MANAGE_AMBI_LIGHT, OPER_MANAGE_TIME_OF_DAY } |
Functions | |
void | oper_manage_set_slot (oper_manage_slot_t *new_slot) |
Function to initiate new operation condition slot. More... | |
uint8_t | oper_manage_get_active_slots () |
uint8_t | oper_manage_check_update () |
Function to check if there are any changes in active slots. More... | |
void | oper_manage_set_light_sense_pin (uint32_t light_sense_adc) |
Function to store ADC pin number. More... | |
#define OPER_MANAGE_INVALID_SLOTS 0xFF |
If all slots are active then module is not working properly
Definition at line 39 of file oper_manage.h.
#define OPER_MANAGE_MAX_SLOTS 8 |
Maximum number of slots which can be managed by the module
Definition at line 36 of file oper_manage.h.
enum oper_list_t |
List of operation conditions which are being managed by the module
Enumerator | |
---|---|
OPER_MANAGE_AMBI_LIGHT | Operation Condition : Ambient light cut-off |
OPER_MANAGE_TIME_OF_DAY | Operation Condition : Time of day |
Definition at line 42 of file oper_manage.h.
uint8_t oper_manage_check_update | ( | ) |
if | [i]th bit is 1 then [i]th condition slot is active. |
Definition at line 55 of file oper_manage.c.
References CLR_BIT_VAR, OPER_MANAGE_AMBI_LIGHT, OPER_MANAGE_MAX_SLOTS, OPER_MANAGE_TIME_OF_DAY, SET_BIT_VAR, SIMPLE_ADC_GAIN1_6, simple_adc_get_value(), and time_tracker_get_current_time_s().
uint8_t oper_manage_get_active_slots | ( | ) |
@breif Function to get status of slots
if | [i]th bit is 1 then [i]th condition slot is active. |
Definition at line 93 of file oper_manage.c.
void oper_manage_set_light_sense_pin | ( | uint32_t | light_sense_adc | ) |
light_sense_adc | ADC pin number. simple_adc_input_t |
Definition at line 32 of file oper_manage.c.
void oper_manage_set_slot | ( | oper_manage_slot_t * | new_slot | ) |
new_slot | Structure pointer to data type oper_manage_slot_t storing new slots information |
Definition at line 39 of file oper_manage.c.
References oper_manage_slot_t::end_cond, OPER_MANAGE_MAX_SLOTS, oper_manage_slot_t::oper_sel, oper_manage_slot_t::slot_no, oper_manage_slot_t::start_cond, and time_tracker_get_current_time_s().