/***************************************************************************//** * @brief Initializes the device. * * @return - The result of the initialization. * Example: ERROR - the device was not initialized or the device * is not present. * SUCCES - the device was initialized and the device * is present. *******************************************************************************/ char DoDeviceInit(void) { if(AD5421_Init() == 0) { CONSOLE_Print("AD5421 OK\r\n"); dacReg = AD5421_GetDac(); offsetReg = AD5421_GetOffset(); gainReg = AD5421_GetGain(); DisplayCmdList(); return SUCCESS; } else { CONSOLE_Print("AD5421 Error\r\n"); return ERROR; } }
int main (void) { volatile char temp = 1; volatile uint16_t temp1 = 1; volatile uint16_t temp2 = 1; volatile bool state = false; system_init(); init_gpio(); clock_output(); delay_init(); configure_spi_master_AD5421(); configure_spi_master_ADXL(); AD5421_Init(); ADXL345_Init(); //configure_extint_channel(); //configure_extint_callbacks(); //system_interrupt_enable_global(); xTaskCreate(Testtask, "Testtask", configMINIMAL_STACK_SIZE, (void *)100, mainQUEUE_SEND_TASK_PRIORITY, NULL); vTaskStartScheduler(); //X = ADXL345_GetX(); //Y = ADXL345_GetY(); //Z = ADXL345_GetZ(); }