RX
Dependencies: mbed BufferedSerial SX1276GenericLib X_NUCLEO_IKS01A2
Diff: SDCard_Y.hh
- Revision:
- 0:fb7bf6d81e5f
diff -r 000000000000 -r fb7bf6d81e5f SDCard_Y.hh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SDCard_Y.hh Wed Jun 05 00:25:53 2019 +0000 @@ -0,0 +1,30 @@ +#include "mbed.h" + + +class SDCard +{ +public: + + SDCard(SPI *t_spi, PinName t_cs); + ~SDCard(); + + int init(void); + + bool read(uint8_t *vect, int post); //Lextura de un bloque de 512 + bool write(uint8_t *vect, int post); //Escritura de un bloque de 512 + +private: + + SPI *spi; + DigitalOut cs; + int cdv; + + int init_card_v1(); + int init_card_v2(); + + int cmd(int cmd, int arg); + int cmd8(); + int cmd58(); + +}; +