Davide Urbano
/
microSDreader
Working version. ADXL355 data saved to microSD.
define.h@0:e2579e8d9b13, 2017-09-29 (annotated)
- Committer:
- DUR
- Date:
- Fri Sep 29 12:53:50 2017 +0000
- Revision:
- 0:e2579e8d9b13
Working version.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DUR | 0:e2579e8d9b13 | 1 | #ifndef __DEFINE_H |
DUR | 0:e2579e8d9b13 | 2 | #define __DEFINE_H |
DUR | 0:e2579e8d9b13 | 3 | |
DUR | 0:e2579e8d9b13 | 4 | /* |
DUR | 0:e2579e8d9b13 | 5 | SEGNALI THREAD |
DUR | 0:e2579e8d9b13 | 6 | */ |
DUR | 0:e2579e8d9b13 | 7 | #define ADXL355_SIGNAL 0x01 //Nuovi dati pronti |
DUR | 0:e2579e8d9b13 | 8 | /* |
DUR | 0:e2579e8d9b13 | 9 | SD CARD READER |
DUR | 0:e2579e8d9b13 | 10 | */ |
DUR | 0:e2579e8d9b13 | 11 | #define SDCARD_CS PC_8 |
DUR | 0:e2579e8d9b13 | 12 | #define SDCARD_SCK PB_13 |
DUR | 0:e2579e8d9b13 | 13 | #define SDCARD_MISO PB_14 |
DUR | 0:e2579e8d9b13 | 14 | #define SDCARD_MOSI PB_15 |
DUR | 0:e2579e8d9b13 | 15 | /* |
DUR | 0:e2579e8d9b13 | 16 | PIN DEBUG |
DUR | 0:e2579e8d9b13 | 17 | */ |
DUR | 0:e2579e8d9b13 | 18 | #define DBG_PIN PC_10 //VERDE |
DUR | 0:e2579e8d9b13 | 19 | #define DBG_PIN_2 PC_11 //BLU |
DUR | 0:e2579e8d9b13 | 20 | #define DBG_PIN_3 PC_12 //VIOLA |
DUR | 0:e2579e8d9b13 | 21 | #define DBG_PIN_4 PC_9 //GIALLO |
DUR | 0:e2579e8d9b13 | 22 | /* |
DUR | 0:e2579e8d9b13 | 23 | BUS SPI |
DUR | 0:e2579e8d9b13 | 24 | */ |
DUR | 0:e2579e8d9b13 | 25 | #define SPI_MISO PA_6 |
DUR | 0:e2579e8d9b13 | 26 | #define SPI_MOSI PA_7 |
DUR | 0:e2579e8d9b13 | 27 | #define SPI_SCK PA_5 |
DUR | 0:e2579e8d9b13 | 28 | #define MAX_LENGTH_SPI_TRANSFER 50 |
DUR | 0:e2579e8d9b13 | 29 | #define SPI_FREQUENCY_HZ 8000000 |
DUR | 0:e2579e8d9b13 | 30 | /* |
DUR | 0:e2579e8d9b13 | 31 | ADXL355 |
DUR | 0:e2579e8d9b13 | 32 | */ |
DUR | 0:e2579e8d9b13 | 33 | #define ADXL355_CS SPI_CS |
DUR | 0:e2579e8d9b13 | 34 | #define ADXL355_DRDY PC_7 |
DUR | 0:e2579e8d9b13 | 35 | #define RECORD_NUMBER 30 //1 secondo @50Hz |
DUR | 0:e2579e8d9b13 | 36 | #define RECORD_SIZE 50 |
DUR | 0:e2579e8d9b13 | 37 | /* |
DUR | 0:e2579e8d9b13 | 38 | PULSANTE |
DUR | 0:e2579e8d9b13 | 39 | */ |
DUR | 0:e2579e8d9b13 | 40 | #define USER_KEY_PIN PC_13 |
DUR | 0:e2579e8d9b13 | 41 | /* |
DUR | 0:e2579e8d9b13 | 42 | LED |
DUR | 0:e2579e8d9b13 | 43 | */ |
DUR | 0:e2579e8d9b13 | 44 | #define STATUS_LED_PIN PA_9 |
DUR | 0:e2579e8d9b13 | 45 | #endif |