int main() { // Enable global interrupts (Used for SPI, PIR and timers) CyGlobalIntEnable; // Create objects buffer bufferObj; buffer_init(&bufferObj); parameters paramObj; parameters_init(¶mObj); // Init boundary sensorPackage_init(); movement_init(); // Init controllers addRemove_init(); config_init(¶mObj, &bufferObj); loadData_init(¶mObj, &bufferObj); onOff_init(¶mObj, &bufferObj); // Stay here and wait for timer og SPI interrupts while(1); // Exits (Never used) sensorPackage_exit(); return 0; }
void init() { m_clockdivide(0); m_disableJTAG(); movement_init(); sensor_init(); }
void setup() { Serial.begin(9600); lcd.begin(16, 2); detect_serial(); movement_init(); sensors_init(); if (COUNTDOWN_ENABLED) { calibrate_countdown(); } path(); }
//init //Initializes variables in main and in other files void init() { seconds = 0; #ifdef DEBUG_ACTIVE //Only if we are debugging, we initialize the varialbes in the debug file debug_init(); #endif init_update(); //We initialize variables in other files #ifdef DEBUG_ACTIVE movement_init(); #endif phase1_init(); phase2_init(); }