Hanna
Sourcecode Batteriemanagementsystem
sd_raw_config.h
gehe zur Dokumentation dieser Datei
1 
15 #define XMEGA 1
16 
17 /*
18  * Copyright (c) 2006-2011 by Roland Riegel <feedback@roland-riegel.de>
19  *
20  * This file is free software; you can redistribute it and/or modify
21  * it under the terms of either the GNU General Public License version 2
22  * or the GNU Lesser General Public License version 2.1, both as
23  * published by the Free Software Foundation.
24  */
25 
26 #ifndef SD_RAW_CONFIG_H
27 #define SD_RAW_CONFIG_H
28 
29 #include <stdint.h>
30 #include "port_driver.h"
31 #include "board_init.h"
32 
49 #define SD_RAW_WRITE_SUPPORT 1
50 
59 #define SD_RAW_WRITE_BUFFERING 1
60 
71 #define SD_RAW_SAVE_RAM 1
72 
80 #define SD_RAW_SDHC 1
81 
86 /* defines for customisation of sd/mmc port access */
87 // Wird über BMS_board gesteuert
88 //#define configure_pin_mosi() PORTE.DIRSET = PIN5_bm
89 //#define configure_pin_sck() PORTE.DIRSET = PIN7_bm
90 //#define configure_pin_ss() PORTF.DIRSET = PIN7_bm
91 //#define configure_pin_miso() PORTE.DIRCLR = PIN6_bm
92 
93 //#define select_card() PORTF.OUTCLR = PIN7_bm;
94 //#define unselect_card() PORTF.OUTSET = PIN7_bm;
95 #define select_card() IO_SetPinLow(SD_READER_CS)
96 #define unselect_card() IO_SetPinHigh(SD_READER_CS)
97 
98 // #define configure_pin_mosi() PORTE.DIRSET = PIN5_bm
99 // #define configure_pin_sck() PORTE.DIRSET = PIN7_bm
100 // #define configure_pin_miso() PORTE.DIRCLR = PIN6_bm
101 
102 //#define configure_pin_ss() PORTF.DIRSET = PIN7_bm
103 //#define select_card() PORTF.OUTCLR = PIN7_bm
104 //#define unselect_card() PORTF.OUTSET = PIN7_bm
105 
106 // #define configure_pin_ss() PORTB.DIRSET = PIN2_bm
107 // #define select_card() PORTB.OUTCLR = PIN2_bm
108 // #define unselect_card() PORTB.OUTSET = PIN2_bm
109 
110 #define configure_pin_available()
111 #define configure_pin_locked()
112 
113 #define get_pin_available() 0
114 #define get_pin_locked() 1
115 
116 
117 #if SD_RAW_SDHC
118 typedef uint64_t offset_t;
119 #else
120 typedef uint32_t offset_t;
121 #endif
122 
123 /* configuration checks */
124 #if SD_RAW_WRITE_SUPPORT
125 #undef SD_RAW_SAVE_RAM
126 #define SD_RAW_SAVE_RAM 0
127 #else
128 #undef SD_RAW_WRITE_BUFFERING
129 #define SD_RAW_WRITE_BUFFERING 0
130 #endif
131 
132 
133 #endif
134 
Standard board header file. Diese Datei enthält die Standardparameter und Pinbelegungen für das BMS B...
XMEGA I/O Port driver header file.