2 #include "../firmware.h"
6 #define UART_INTERFACE UART_CAMERA
18 UART_puts(UART_INTERFACE,
"\r\nIMU Demo\r\n");
24 UART_puts(UART_INTERFACE,
"\r\nSelftest: FAIL\r\n");
28 UART_puts(UART_INTERFACE,
"\r\nSelftest: OK\r\n");
35 sprintf(output,
"Accel: X %+06d, Y %+06d, Z %+06d\r\n", x, y, z);
39 sprintf(output,
"Gyro: X %+06d, Y %+06d, Z %+06d\r\n", x, y, z);
43 sprintf(output,
"Magno: X %+06d, Y %+06d, Z %+06d\r\n", x, y, z);
47 sprintf(output,
"Temp: %+06d\r\n", x);
50 UART_puts(UART_INTERFACE,
"--------------------------------\r\n");
void Delay_ms(uint32_t milliseconds)
void UART_init(uint8_t uart_num, uint32_t baudrate)
void IMU_read_temp(int16_t *temp_imu)
void LED_off(uint8_t led_num)
int main(void)
Runs all module tests.
void IMU_read_magno(int16_t *magno_x, int16_t *magno_y, int16_t *magno_z)
void UART_puts(uint8_t uart_num, char *str)
void IMU_read_gyro(int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z)
void IMU_read_accel(int16_t *accel_x, int16_t *accel_y, int16_t *accel_z)
void LED_on(uint8_t led_num)