Просмотр исходного кода

Comments in HAL_spi_STM32F1.cpp

Scott Lahteine 6 лет назад
Родитель
Сommit
d9a3fea022
1 измененных файлов: 14 добавлений и 5 удалений
  1. 14
    5
      Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp

+ 14
- 5
Marlin/src/HAL/HAL_STM32F1/HAL_spi_STM32F1.cpp Просмотреть файл

@@ -86,7 +86,7 @@ void spiBegin() {
86 86
 }
87 87
 
88 88
 /**
89
- * @brief  Initializes SPI port to required speed rate and transfer mode (MSB, SPI MODE 0)
89
+ * @brief  Initialize SPI port to required speed rate and transfer mode (MSB, SPI MODE 0)
90 90
  *
91 91
  * @param  spiRate Rate as declared in HAL.h (speed do not match AVR)
92 92
  * @return Nothing
@@ -109,7 +109,7 @@ void spiInit(uint8_t spiRate) {
109 109
 }
110 110
 
111 111
 /**
112
- * @brief  Receives a single byte from the SPI port.
112
+ * @brief  Receive a single byte from the SPI port.
113 113
  *
114 114
  * @return Byte received
115 115
  *
@@ -123,7 +123,7 @@ uint8_t spiRec(void) {
123 123
 }
124 124
 
125 125
 /**
126
- * @brief  Receives a number of bytes from the SPI port to a buffer
126
+ * @brief  Receive a number of bytes from the SPI port to a buffer
127 127
  *
128 128
  * @param  buf   Pointer to starting address of buffer to write to.
129 129
  * @param  nbyte Number of bytes to receive.
@@ -138,7 +138,7 @@ void spiRead(uint8_t* buf, uint16_t nbyte) {
138 138
 }
139 139
 
140 140
 /**
141
- * @brief  Sends a single byte on SPI port
141
+ * @brief  Send a single byte on SPI port
142 142
  *
143 143
  * @param  b Byte to send
144 144
  *
@@ -165,7 +165,16 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
165 165
   SPI.endTransaction();
166 166
 }
167 167
 
168
-/** Begin SPI transaction, set clock, bit order, data mode */
168
+/**
169
+ * @brief  Begin SPI transaction, set clock, bit order, data mode
170
+ *
171
+ * @param  spiClock   Clock setting
172
+ * @param  bitOrder   Bit Order setting
173
+ * @param  dataMode   Data Mode setting
174
+ * @return Nothing
175
+ *
176
+ * @details Uses an SPI Config via SPISettings
177
+ */
169 178
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
170 179
   spiConfig = SPISettings(spiClock, (BitOrder)bitOrder, dataMode);
171 180
   SPI.beginTransaction(spiConfig);

Загрузка…
Отмена
Сохранить