You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
803 B
41 lines
803 B
#include "main.h"
|
|
#include "delay.h"
|
|
#include "pin.h"
|
|
#include "deviceSetup.h"
|
|
#include "uartComm.h"
|
|
#include "sensor.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
uint8_t i = 0;
|
|
|
|
delayInitMs(8000000, 1000); // Clock Freq and Divider for ARM library
|
|
|
|
pinConfig(pinB3, output, pushPull, def_res, def_speed);
|
|
pinConfig(pinA0, input, def_stage, pullDown, def_speed);
|
|
|
|
setupInit(); // This is the sescond call of System init the assebly start code is calling it before the main.
|
|
|
|
uartCommInit();
|
|
//blinks 10 times to indicate the sicsessfull init if the device
|
|
for(i = 0 ; i < 2 ; i++) {
|
|
delayMs(100);
|
|
pinToggle(pinB3);
|
|
delayMs(100);
|
|
}
|
|
|
|
uartCommPrintWellcome();
|
|
sensorActivate(1);
|
|
sensorActivate(0);
|
|
|
|
while(1)
|
|
{
|
|
delayMs(100);
|
|
pinToggle(pinB3);
|
|
delayMs(100);
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
|