RX

Dependencies:   mbed BufferedSerial SX1276GenericLib X_NUCLEO_IKS01A2

Committer:
TMRL123
Date:
Wed Jun 05 00:23:37 2019 +0000
Revision:
0:674f1e460248
Commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
TMRL123 0:674f1e460248 1 #include "mbed.h"
TMRL123 0:674f1e460248 2
TMRL123 0:674f1e460248 3
TMRL123 0:674f1e460248 4 class SDCard
TMRL123 0:674f1e460248 5 {
TMRL123 0:674f1e460248 6 public:
TMRL123 0:674f1e460248 7
TMRL123 0:674f1e460248 8 SDCard(SPI *t_spi, PinName t_cs);
TMRL123 0:674f1e460248 9 ~SDCard();
TMRL123 0:674f1e460248 10
TMRL123 0:674f1e460248 11 int init(void);
TMRL123 0:674f1e460248 12
TMRL123 0:674f1e460248 13 bool read(uint8_t *vect, int post); //Lextura de un bloque de 512
TMRL123 0:674f1e460248 14 bool write(uint8_t *vect, int post); //Escritura de un bloque de 512
TMRL123 0:674f1e460248 15
TMRL123 0:674f1e460248 16 private:
TMRL123 0:674f1e460248 17
TMRL123 0:674f1e460248 18 SPI *spi;
TMRL123 0:674f1e460248 19 DigitalOut cs;
TMRL123 0:674f1e460248 20 int cdv;
TMRL123 0:674f1e460248 21
TMRL123 0:674f1e460248 22 int init_card_v1();
TMRL123 0:674f1e460248 23 int init_card_v2();
TMRL123 0:674f1e460248 24
TMRL123 0:674f1e460248 25 int cmd(int cmd, int arg);
TMRL123 0:674f1e460248 26 int cmd8();
TMRL123 0:674f1e460248 27 int cmd58();
TMRL123 0:674f1e460248 28
TMRL123 0:674f1e460248 29 };
TMRL123 0:674f1e460248 30