lkdfjlakdjsflasdkjflkjasdlxkfghskjdmfnvcm,a wejdfkjadsb cvljdgacus;b faLRFBhetg;8bdvan;/IHgtnudihdgrg;a/wlhrfp;ouitdscagjh
Dependencies: mbed
Fork of display_nums2 by
spi_fix.h
- Committer:
- billymark
- Date:
- 2018-03-09
- Revision:
- 3:1acb956e61b2
- Child:
- 4:a01cf485b9d9
File content as of revision 3:1acb956e61b2:
#ifndef SPI #define SPI #include <mbed.h> #define SPI_NO_ID 1 #define SPI_AS1107_ID 2 #define DRV8806_ID 3 struct spi_cfg { int spi_id; //ID should be unique for each slave type DigitalOut spi_ncs; //The pin driving the slave's chip select int spi_mode; //SPI mode needed by this slave int spi_freq; //SPI frequency needed by this slave int spi_no_bits; //No. of data bits to be transfered each send to the slave}; }; void spi_send(struct spi_cfg spi_config, int spi_data); #endif