OpenShoe  1.0
Functions | Variables
main.c File Reference

Main function and interrupt control. More...

#include <asf.h>
#include "process_sequence.h"
#include "external_interface.h"
#include "imu_interface.h"

Functions

void imu_interupt_init (void)
void eic_nmi_handler (void)
void system_init (void)
 Initialize hardware and communication interfaces.
void wait_for_interrupt (void)
 Wait for the interrupt flag to be set, toggle it, increase interrupt counter, and return.
void within_time_limit (void)
 Checks that the main loop has finished before next interrupt.
int main (void)

Variables

uint32_t interrupt_counter = 0
uint32_t imu_interrupt_ts

Detailed Description

Main function and interrupt control.

This file contains the main function and interrupt control. The main function control the execution of the program. The single interrupt routine only toggles a flag which the main function is polling. Each time the flag is toggled, the following will be executed in the main loop: 1) data is read from the IMU 2) functions in the process sequence are executed 3) commands are received from the user 4) data are transmitted back 5) and it is checked that a new interrupt did not arrived while the program was executing the main loop.

Authors:
John-Olof Nilsson, Isaac Skog
 All Data Structures Files Functions Variables Typedefs Defines