Working version. ADXL355 data saved to microSD.

Committer:
DUR
Date:
Fri Sep 29 12:53:50 2017 +0000
Revision:
0:e2579e8d9b13
Working version.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DUR 0:e2579e8d9b13 1 #ifndef __UTILITY_H
DUR 0:e2579e8d9b13 2 #define __UTILITY_H
DUR 0:e2579e8d9b13 3
DUR 0:e2579e8d9b13 4
DUR 0:e2579e8d9b13 5 #include "mbed.h"
DUR 0:e2579e8d9b13 6 #include <ctype.h>
DUR 0:e2579e8d9b13 7 #include <stdio.h>
DUR 0:e2579e8d9b13 8 #include "adxl355.h"
DUR 0:e2579e8d9b13 9 #include "define.h"
DUR 0:e2579e8d9b13 10
DUR 0:e2579e8d9b13 11 typedef struct
DUR 0:e2579e8d9b13 12 { /* Index */
DUR 0:e2579e8d9b13 13 uint32_t index;
DUR 0:e2579e8d9b13 14 /* Error */
DUR 0:e2579e8d9b13 15 uint16_t error;
DUR 0:e2579e8d9b13 16 /* Timestamp */
DUR 0:e2579e8d9b13 17 uint32_t timestamp;
DUR 0:e2579e8d9b13 18 /* ADXL 355 */
DUR 0:e2579e8d9b13 19 uint32_t adxl355_rawX;
DUR 0:e2579e8d9b13 20 uint32_t adxl355_rawY;
DUR 0:e2579e8d9b13 21 uint32_t adxl355_rawZ;
DUR 0:e2579e8d9b13 22 uint32_t adxl355_rawT;
DUR 0:e2579e8d9b13 23 /* ADXL 354 */
DUR 0:e2579e8d9b13 24 uint32_t adxl354_rawX;
DUR 0:e2579e8d9b13 25 uint32_t adxl354_rawY;
DUR 0:e2579e8d9b13 26 uint32_t adxl354_rawZ;
DUR 0:e2579e8d9b13 27 uint32_t adxl354_rawT;
DUR 0:e2579e8d9b13 28 /* COLIBRYS */
DUR 0:e2579e8d9b13 29 uint32_t colibrys_rawVal;
DUR 0:e2579e8d9b13 30 uint32_t colibrys_rawTEMPval;
DUR 0:e2579e8d9b13 31 }record_t;
DUR 0:e2579e8d9b13 32
DUR 0:e2579e8d9b13 33
DUR 0:e2579e8d9b13 34 /* Funzione di gestione interrupt pulsante */
DUR 0:e2579e8d9b13 35 //void pressed(void);
DUR 0:e2579e8d9b13 36 /* Funzione di gestione dell'interrupt dell'ADXL355 */
DUR 0:e2579e8d9b13 37 //void adxl355_int_handler(void);
DUR 0:e2579e8d9b13 38 /* Funzione di salvataggio su SD Card */
DUR 0:e2579e8d9b13 39 //void save_data_SD_card(uint8_t* data2save, uint16_t length);
DUR 0:e2579e8d9b13 40 #endif
DUR 0:e2579e8d9b13 41