55 Micro_controller_template_init();
95 IRPyro_sensor_device_type IRPyro_single_sensor = {0};
97 IRPyro_single_sensor.INT_Port = 1;
98 IRPyro_single_sensor.CS_Port = 2;
99 IRPyro_single_sensor.CS_Pin = 1;
100 IRPyro_single_sensor.INT_Pin = 4;
102 IRPyro_single_sensor.number_of_active_channels = 1;
103 IRPyro_single_sensor.read_mode = 1;
104 IRPyro_single_sensor.address = 0x08;
108 UART_PutString(USART2, (uint8_t*)
"01 IRPyro TO: Initialize a single device \n");
127 IRPyro_devices IRPyro_device = {0};
129 AFE_reg_type IRPyro_AFE_configuration =
131 .CLK_OUT = CLK_DISABLE,
136 IRPyro_device[0].INT_Port = 1;
137 IRPyro_device[0].CS_Port = 2;
138 IRPyro_device[0].CS_Pin = 1;
139 IRPyro_device[0].INT_Pin = 4;
140 IRPyro_device[0].address = 0x70;
142 IRPyro_device[1].CS_Port = 2;
143 IRPyro_device[1].INT_Port = 1;
144 IRPyro_device[1].CS_Pin = 5;
145 IRPyro_device[1].INT_Pin = 5;
146 IRPyro_device[1].address = 0x69;
148 IRPyro_device[2].CS_Port = 2;
149 IRPyro_device[2].INT_Port = 1;
150 IRPyro_device[2].CS_Pin = 4;
151 IRPyro_device[2].INT_Pin = 6;
152 IRPyro_device[2].address = 0x68;
155 IRPyro_device[0].AFE_register = IRPyro_AFE_configuration;
156 IRPyro_device[0].number_of_active_channels = 1;
157 IRPyro_device[0].read_mode = 1;
158 IRPyro_device[1].AFE_register = IRPyro_AFE_configuration;
159 IRPyro_device[1].number_of_active_channels = 1;
160 IRPyro_device[1].read_mode = 1;
161 IRPyro_device[2].AFE_register = IRPyro_AFE_configuration;
162 IRPyro_device[2].number_of_active_channels = 1;
163 IRPyro_device[2].read_mode = 1;
166 UART_PutString(USART2, (uint8_t*)
"02 IRPyro TO: Initialize multiple devices \n");
188 IRPyro_sensor_device_type IRPyro_single_sensor = {0};
190 IRPyro_single_sensor.INT_Port = 1;
191 IRPyro_single_sensor.CS_Port = 2;
192 IRPyro_single_sensor.CS_Pin = 1;
193 IRPyro_single_sensor.INT_Pin = 4;
195 IRPyro_single_sensor.number_of_active_channels = 1;
196 IRPyro_single_sensor.read_mode = 1;
197 IRPyro_single_sensor.address = 0x08;
201 UART_PutString(USART2, (uint8_t*)
"03 IRPyro TO: READ DATA FROM A SINGLE IRPyro TO SENSOR and detect frames missing\n");
224 IRPyro_devices IRPyro_device = {0};
226 AFE_reg_type IRPyro_AFE_Master =
229 .LP = LOW_POWER_DISABLE,
231 .C_LP = LOW_PASS_22_5,
232 .CLK_OUT = CLK_DISABLE,
239 IRPyro_device[0].INT_Port = 1;
240 IRPyro_device[0].CS_Port = 2;
241 IRPyro_device[0].CS_Pin = 1;
242 IRPyro_device[0].INT_Pin = 4;
243 IRPyro_device[0].address = 0x70;
245 IRPyro_device[1].CS_Port = 2;
246 IRPyro_device[1].INT_Port = 1;
247 IRPyro_device[1].CS_Pin = 5;
248 IRPyro_device[1].INT_Pin = 5;
249 IRPyro_device[1].address = 0x69;
251 IRPyro_device[2].CS_Port = 2;
252 IRPyro_device[2].INT_Port = 1;
253 IRPyro_device[2].CS_Pin = 4;
254 IRPyro_device[2].INT_Pin = 6;
255 IRPyro_device[2].address = 0x68;
258 IRPyro_device[0].AFE_register = IRPyro_AFE_Master;
259 IRPyro_device[0].read_mode = 1;
260 IRPyro_device[0].number_of_active_channels = 1;
262 IRPyro_device[1].AFE_register = IRPyro_AFE_Master;
263 IRPyro_device[1].read_mode = 1;
264 IRPyro_device[1].number_of_active_channels = 1;
266 IRPyro_device[2].AFE_register = IRPyro_AFE_Master;
267 IRPyro_device[2].read_mode = 1;
268 IRPyro_device[2].number_of_active_channels = 1;
272 UART_PutString(USART2, (uint8_t*)
"04 IRPyro TO: READ DATA FROM MULTIPLE SENSORS and detect frames missing\n");
295 IRPyro_sensor_device_type IRPyro_single_sensor = {0};
297 IRPyro_single_sensor.INT_Port = 1;
298 IRPyro_single_sensor.CS_Port = 2;
299 IRPyro_single_sensor.CS_Pin = 1;
300 IRPyro_single_sensor.INT_Pin = 4;
302 IRPyro_single_sensor.read_mode = 2;
303 IRPyro_single_sensor.address = 0x08;
304 IRPyro_single_sensor.number_of_active_channels = 1;
308 UART_PutString(USART2, (uint8_t*)
"05 IRPyro TO: Change sensor POWER CONFIGURATION\n");
334 IRPyro_sensor_device_type IRPyro_single_sensor = {0};
336 IRPyro_single_sensor.INT_Port = 1;
337 IRPyro_single_sensor.CS_Port = 2;
338 IRPyro_single_sensor.CS_Pin = 1;
339 IRPyro_single_sensor.INT_Pin = 4;
341 IRPyro_single_sensor.read_mode = 2;
342 IRPyro_single_sensor.address = 0x70;
343 IRPyro_single_sensor.number_of_active_channels = 1;
345 IRPyro_single_sensor.WUP_register.UHT = MAX_WUP_THRESHOLD;
346 IRPyro_single_sensor.WUP_register.ULT = SAFE_WUP_THRESHOLD;
347 IRPyro_single_sensor.WUP_register.LHT = MIN_WUP_THRESHOLD;
348 IRPyro_single_sensor.WUP_register.LLT = MIN_WUP_THRESHOLD;
349 IRPyro_single_sensor.WUP_register.WT_Threshold = DEFAULT_NO_EVENTS;
350 IRPyro_single_sensor.WUP_register.DP0_DP2 = SEL_CH_2;
351 IRPyro_single_sensor.WUP_register.CH0_CH2 = SEL_CH_2;
352 IRPyro_single_sensor.WUP_register.ST = SLEEP_MODE_ONE_CH;
356 UART_PutString(USART2, (uint8_t*)
"06 IRPyro TO: Configure sensor WAKE UP EVENT, SEND TO SLEEP, DETECT WAKE UP \n");
377 IRPyro_sensor_device_type IRPyro_single_sensor = {0};
379 IRPyro_single_sensor.INT_Port = 1;
380 IRPyro_single_sensor.CS_Port = 2;
381 IRPyro_single_sensor.CS_Pin = 1;
382 IRPyro_single_sensor.INT_Pin = 4;
384 IRPyro_single_sensor.read_mode = 2;
385 IRPyro_single_sensor.address = 0x08;
386 IRPyro_single_sensor.number_of_active_channels = 1;
390 UART_PutString(USART2, (uint8_t*)
"07 IRPyro TO: Change PARAMETERS on the fly\n");
399 CS_pin_set(2,1,state);
400 CS_pin_set(2,3,state);
401 CS_pin_set(2,4,state);
402 CS_pin_set(2,5,state);
411 Micro_controller_delay_ms(30);
413 Micro_controller_delay_ms(30);
uint8_t ut02_multiple_sensor_init(IRPyro_devices this_list, uint8_t list_size)
void TO_test02(void)
Configures a list of IRPyro TO. The configuration data is read from the sensors and compared...
uint8_t ut03_single_sensor_read(IRPyro_sensor_device_type *IRPyro_TEST_Sensor)
uint8_t ut01_single_sensor_init(IRPyro_sensor_device_type *IRPyro_TEST_Sensor)
uint8_t ut_wake_up_event(IRPyro_sensor_device_type *IRPyro_test_Sensor)
Wake up event.
void IRPyro_demo_board(uint8_t value)
Changes the state of all the CS lines as used on the IRPyro backplane board.
uint8_t ut06_IOCTL02(IRPyro_sensor_device_type *IRPyro_test_Sensor)
void TO_test06(void)
Send a single IRPyro TO to sleep and then wake up by command The following API commands are issued: p...
void demo_board_sensor_control(int state)
Changes the state of all the CS lines as used on the IRPyro backplane board.
uint8_t ut06_IOCTL01(IRPyro_sensor_device_type *IRPyro_test_Sensor)
Test of IOCTL functions.
static void sensor_power_stabilize(void)
power cycles the sensors on the board to assure stability
void TO_test03(void)
Configures a single IRPyro TO for data streaming and verifies if any frame is missing One hour of dat...
int main()
unit testing main program.
void TO_test04(void)
A maximum of three IRPyro TO sensors are configured for data read with frame counter detection config...
void TO_test05(void)
Change register settings of a single IRPyro TO The following API commands are issued: sampling_rate_s...
void TO_test01(void)
Configures the registers of a single IRPyro TO and then read back again.
uint8_t ut04_multiple_sensor_read(IRPyro_devices this_list, uint8_t list_size)
void TO_test07(void)
Turn OFF and ON a single IRPyro TO with parameters restored The following API commands are issued: po...