Example #1
0
int main()
{
    // Enable global interrupts (Used for SPI, PIR and timers)  
    CyGlobalIntEnable;
    
    // Create objects
    buffer bufferObj;
    buffer_init(&bufferObj);
    
    parameters paramObj;
    parameters_init(&paramObj);

    // Init boundary
    sensorPackage_init();
    movement_init();
    
    // Init controllers
    addRemove_init();
    config_init(&paramObj, &bufferObj);
    loadData_init(&paramObj, &bufferObj);
    onOff_init(&paramObj, &bufferObj);
    
    // Stay here and wait for timer og SPI interrupts
    while(1);
   
    // Exits (Never used)
    sensorPackage_exit();
    
    return 0;
}
Example #2
0
void init()
{
    m_clockdivide(0);
    m_disableJTAG();

    movement_init();
    sensor_init();
}
Example #3
0
void setup()
{
    Serial.begin(9600);
    lcd.begin(16, 2);
    detect_serial();
    movement_init();
    sensors_init();
    if (COUNTDOWN_ENABLED) {
        calibrate_countdown();
    }

    path();
} 
Example #4
0
//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();
}