R2R
r2r.h
Go to the documentation of this file.
1 
12 #ifndef R2R_H_
13 #define R2R_H_
14 
15 #include <stdbool.h>
16 #include <stdint.h>
17 #include <stdlib.h>
18 #include <stdio.h>
19 #include <stdarg.h>
20 #include "sensorlib/i2cm_drv.h"
21 #include "sensorlib/hw_mpu6050.h"
22 #include "sensorlib/mpu6050.h"
23 #include "inc/hw_ints.h"
24 #include "inc/hw_memmap.h"
25 #include "inc/hw_sysctl.h"
26 #include "inc/hw_types.h"
27 #include "inc/hw_i2c.h"
28 #include "inc/hw_types.h"
29 #include "inc/hw_gpio.h"
30 #include "driverlib/gpio.h"
31 #include "driverlib/pin_map.h"
32 #include "driverlib/rom.h"
33 #include "driverlib/rom_map.h"
34 #include "driverlib/debug.h"
35 #include "driverlib/interrupt.h"
36 #include "driverlib/i2c.h"
37 #include "driverlib/sysctl.h"
38 #include "driverlib/pwm.h"
39 #include "driverlib/timer.h"
40 #include "driverlib/uart.h"
41 #include "driverlib/ssi.h"
42 #include "driverlib/systick.h"
43 #include "driverlib/adc.h"
44 #include "utils/uartstdio.h"
45 
46 
47 /*
48  * General functions
49  */
50 
66 extern void r2rDefaultInit(void);
67 
68 
69 #define MOTOR1 1
70 #define MOTOR2 2
71 
72 uint32_t ui32SysClock;
73 uint32_t micros;
74 
75 //int error_state = 0;
76 
84 extern void sysInit(void);
85 
93 extern void uartInit(void);
94 
104 extern void UART0read(char * message, int maxLength);
105 
106 
115 extern void UART0write(const char * string);
116 
126 extern void customTimersInit(void);
127 
148 extern void TIMER6IntHandler(void);
149 
159 extern void TIMER7IntHandler(void);
160 
167 extern void delayMS(int ms); // stops processor for a given amount of time in ms, this is approximate.
168 
176 extern void timeInit(void);
177 
192 extern uint32_t getTime(void);
193 
202 extern void timeInt(void);
203 
204 #endif /* R2R_H_ */
void r2rDefaultInit(void)
Initializes the default connections for the R2R project.
Definition: r2r.c:54
void timeInit(void)
Initializes the general purpose systick timer.
Definition: r2r.c:168
void TIMER7IntHandler(void)
Custom timer 7.
void customTimersInit(void)
Initializes custom timers.
void UART0write(const char *string)
Writes output from UART.
Definition: r2r.c:143
void delayMS(int ms)
Stops the processor for a given amount of time. This is an approximate time.
Definition: r2r.c:158
void TIMER6IntHandler(void)
Custom timer 6.
void timeInt(void)
The general purpose timer interrupt function.
Definition: r2r.c:175
void sysInit(void)
Initializes the system clock and the master interrupts for the R2R project.
Definition: r2r.c:80
void UART0read(char *message, int maxLength)
Reads input from UART.
Definition: r2r.c:118
void uartInit(void)
Initializes the UART for 115200 Baud Rate and 8-N-1 transfer rate.
Definition: r2r.c:99
uint32_t getTime(void)
Returns the time in microseconds.
Definition: r2r.c:179