ADS_BP
process.h
Go to the documentation of this file.
1 
15 #ifndef ALCD_PROCESS_H_
16 #define ALCD_PROCESS_H_
17 
18 
19 /* libraries */
20 #include <stdint.h>
21 #include <stdbool.h>
22 #include "arm_math.h"
23 #include "driverlib/uart.h"
24 #include "driverlib/pwm.h"
25 #include "driverlib/adc.h"
26 #include "inc/hw_ints.h"
27 #include "driverlib/interrupt.h"
28 #include "inc/hw_timer.h"
29 #include "driverlib/timer.h"
30 #include "inc/hw_memmap.h"
31 
32 #include "ADS1299.h"
33 
34 
35 /* defines */
36 #define COMM_UARTPORT UART1_BASE
37 #define COMM_UARTINT INT_UART1
38 
39 // BT module
40 #define WT12_NOTPRESENT 0x00
41 #define WT12_PRESENT 0x01
42 #define WT12_CONNECTED 0x02
43 
44 // Battery analog pins
45 #define AN_INPUT ADC_CTL_CH0
46 #define R1_DIVIDER 10000 // R29
47 #define R2_DIVIDER 4750 // ALC-D1.0 R32, ALC-D1.1 R30
48 #define K_DIVIDER (R1_DIVIDER+R2_DIVIDER)/R2_DIVIDER
49 #define AN_INPUT_NTC ADC_CTL_CH5
50 #define R_DIVIDER_NTC 5600 // LatchPB5 R8
51 #define R_PARALLEL_NTC 10000 // LatchPB5 R7
52 #define NTC_25_RESISTANCE 10000
53 #define NTC_B_PARAMETER 3435
54 #define NTC_T0_PARAMETER 25
55 #define NTC_R_PARAMETER (NTC_25_RESISTANCE*exp(-NTC_B_PARAMETER/NTC_T0_PARAMETER)))
56 
57 /* structures */
58 
59 
60 /* prototypes */
61 void ResetFilterArrays(unsigned char nCh);
62 float32_t FilterSample(float32_t inData, unsigned char filterIndex);
63 void UARTReceive4Bytes(uint32_t *ptr);
64 void UARTSend4Bytes(unsigned char *ptr);
65 void UARTSendByte(unsigned char byte);
66 
67 
68 /* global variables */
69 
70 
71 #endif /* ALCD_PROCESS_H_ */
72 
float32_t FilterSample(float32_t inData, unsigned char filterIndex)
It calls the routines for filtering a new sample.
Definition: process.c:214
void UARTReceive4Bytes(uint32_t *ptr)
This function can be used to easily handle the reception on the UART of 4bytes sized variables...
Definition: process.c:234
void ResetFilterArrays(unsigned char nCh)
Needed to reset the history of the filters and delete the previous states.
Definition: process.c:185
void UARTSendByte(unsigned char byte)
This function can be used to easily handle the transmission on the UART of one byte. It is meant for the application of flow control.
Definition: process.c:284
void UARTSend4Bytes(unsigned char *ptr)
This function can be used to easily handle the transmit on the UART of 4bytes sized variables...
Definition: process.c:246