Hi, guys.
Here is the document on <spi.h>
http://leaflabs.com/docs/libmaple/api/spi.html
When I call this function:
void spi_gpio_cfg(uint8 as_master, gpio_dev * nss_dev, uint8 nss_bit, gpio_dev * comm_dev, uint8 sck_bit, uint8 miso_bit, uint8 mosi_bit)
'nss_dev' and 'nss_bit' will specify a certain pin for SS,
'comm_dev', 'sck_bit', 'miso_bit', 'mosi_bit' will specify pins for SCK, MOSI, and MISO.
My question:
1. Does this mean <spi.h> provides * software spi* ?
For a hardware spi, SCK, MOSI, MISO should not have too nuch choices.
2. May I just ignore the NSS pin, and set other pins for SS?
VS1003B needs 2 pins, one for command SS and one for data SS.
3. May I use pinMode(...) for the SCK, MISO, MOSI pins?
Or, the only way to set them is to use functions provided by <gpio.h>?
Or, it is not necessary to do so?
Thank you very much!