diff options
author | Perry Hung <iperry@gmail.com> | 2011-01-24 23:23:29 -0500 |
---|---|---|
committer | Perry Hung <iperry@gmail.com> | 2011-01-24 23:23:29 -0500 |
commit | c48689d34809943a5907884bd287cea9ae275352 (patch) | |
tree | d49ff06b0d4b81f6ab0eac8060d178ce7542476c /wirish/comm | |
parent | 64431fd4b59cb8656365f1fad5f679cd4d756239 (diff) | |
parent | a9b2d70bc7799ca96c1673b18fe3012b1a4dd329 (diff) | |
download | librambutan-c48689d34809943a5907884bd287cea9ae275352.tar.gz librambutan-c48689d34809943a5907884bd287cea9ae275352.zip |
Merge remote branch 'leaf/master'
Diffstat (limited to 'wirish/comm')
-rw-r--r-- | wirish/comm/HardwareSPI.h | 23 | ||||
-rw-r--r-- | wirish/comm/HardwareSerial.h | 9 |
2 files changed, 22 insertions, 10 deletions
diff --git a/wirish/comm/HardwareSPI.h b/wirish/comm/HardwareSPI.h index 03d1ea1..7241d0b 100644 --- a/wirish/comm/HardwareSPI.h +++ b/wirish/comm/HardwareSPI.h @@ -29,18 +29,23 @@ #ifndef _HARDWARESPI_H_ #define _HARDWARESPI_H_ +/** + * Defines the possible SPI communication speeds. + */ typedef enum SPIFrequency { - SPI_18MHZ = 0, - SPI_9MHZ = 1, - SPI_4_5MHZ = 2, - SPI_2_25MHZ = 3, - SPI_1_125MHZ = 4, - SPI_562_500KHZ = 5, - SPI_281_250KHZ = 6, - SPI_140_625KHZ = 7, - MAX_SPI_FREQS = 8, + SPI_18MHZ = 0, /**< 18 MHz */ + SPI_9MHZ = 1, /**< 9 MHz */ + SPI_4_5MHZ = 2, /**< 4.5 MHz */ + SPI_2_25MHZ = 3, /**< 2.25 MHZ */ + SPI_1_125MHZ = 4, /**< 1.125 MHz */ + SPI_562_500KHZ = 5, /**< 562.500 KHz */ + SPI_281_250KHZ = 6, /**< 281.250 KHz */ + SPI_140_625KHZ = 7, /**< 140.625 KHz */ + MAX_SPI_FREQS = 8, /**< The number of SPI frequencies. */ } SPIFrequency; +/* Documented by hand in docs/source/lang/api/hardwarespi.rst; if you + make any changes, make sure to update this document. */ class HardwareSPI { private: uint32 spi_num; diff --git a/wirish/comm/HardwareSerial.h b/wirish/comm/HardwareSerial.h index f67f09a..aad8aa7 100644 --- a/wirish/comm/HardwareSerial.h +++ b/wirish/comm/HardwareSerial.h @@ -35,6 +35,13 @@ #include "Print.h" +/* NB: this class documented "by hand" (i.e., not using Doxygen) in: + + libmaple/docs/source/lang/serial.rst + + If you alter the public HardwareSerial interface, you must update + the documentation accordingly. */ + class HardwareSerial : public Print { private: uint8 usart_num; @@ -52,7 +59,7 @@ class HardwareSerial : public Print { uint8 rx_pin, timer_dev_num timer_num, uint8 compare_num); - void begin(uint32); + void begin(uint32 baud); void end(void); uint32 available(void); uint8 read(void); |