19 #include "oper_manage.h" 20 #include "simple_adc.h" 21 #include "common_util.h" 23 static uint32_t light_sense_pin;
34 light_sense_pin = light_sense_adc;
48 && current_time <= new_slot->end_cond)
50 active_slots |= 1 << new_slot->
slot_no;
61 if(arr_start_cond[slot_no] == arr_end_cond[slot_no])
67 if(current_time >= arr_start_cond[slot_no]
68 && current_time <= arr_end_cond[slot_no])
79 if(light_val >= arr_start_cond[slot_no]
80 && light_val <= arr_end_cond[slot_no])
uint32_t simple_adc_get_value(simple_adc_gain_t gain, simple_adc_input_t pin)
This function initializes the SAADC peripheral, gets an ADC value and then deinitializes The function...
uint32_t time_tracker_get_current_time_s()
Function to get current time in ms.
uint8_t oper_manage_check_update()
Function to check if there are any changes in active slots.
#define SET_BIT_VAR(VAR, BIT_NO)
Macro to set particular bit in a given variable without affecting other bits.
#define OPER_MANAGE_INVALID_SLOTS
uint8_t oper_manage_get_active_slots()
void oper_manage_set_light_sense_pin(uint32_t light_sense_adc)
Function to store ADC pin number.
#define OPER_MANAGE_MAX_SLOTS
#define CLR_BIT_VAR(VAR, BIT_NO)
Macro to clear particular bit in a given variable without affecting other bits.
void oper_manage_set_slot(oper_manage_slot_t *new_slot)
Function to initiate new operation condition slot.