3131class SPIClassRP2040 : public arduino ::HardwareSPI {
3232public:
3333 /* *
34- @brief Create a PIO-based SPI instance, pins can be changed before begin() call
34+ @brief Create a PIO-based SPI instance, pins can be changed before begin() call
3535
36- @param [in] spi SPI hardware instance (spi0/spi1)
37- @param [in] rx MISO GPIO
38- @param [in] cs CS GPIO
39- @param [in] sck SCK GPIO
40- @param [in] tx MOSI GPIO
36+ @param [in] spi SPI hardware instance (spi0/spi1)
37+ @param [in] rx MISO GPIO
38+ @param [in] cs CS GPIO
39+ @param [in] sck SCK GPIO
40+ @param [in] tx MOSI GPIO
4141 */
4242 SPIClassRP2040 (spi_inst_t *spi, pin_size_t rx, pin_size_t cs, pin_size_t sck, pin_size_t tx);
4343
4444 /* *
45- @brief Send an 8-bit byte of data and return read-back 8-bit value
45+ @brief Send an 8-bit byte of data and return read-back 8-bit value
4646
47- @param [in] data Data to send
48- @returns Read back byte from SPI interface
47+ @param [in] data Data to send
48+ @returns Read back byte from SPI interface
4949 */
5050 byte transfer (uint8_t data) override ;
5151
@@ -67,11 +67,11 @@ class SPIClassRP2040 : public arduino::HardwareSPI {
6767 void transfer (void *buf, size_t count) override ;
6868
6969 /* *
70- @brief Sends one buffer and receives into another under a single CS. Can set rx or txbuf to nullptr
70+ @brief Sends one buffer and receives into another under a single CS. Can set rx or txbuf to nullptr
7171
72- @param [in] txbuf Buffer to transmit or nullptr to send 0s
73- @param [out] rxbuf Buffer to read back into or nullptr to ignore returned data
74- @param [in] count Numbner of bytes to transmit/receive
72+ @param [in] txbuf Buffer to transmit or nullptr to send 0s
73+ @param [out] rxbuf Buffer to read back into or nullptr to ignore returned data
74+ @param [in] count Numbner of bytes to transmit/receive
7575 */
7676 void transfer (const void *txbuf, void *rxbuf, size_t count) override ;
7777
@@ -108,134 +108,134 @@ class SPIClassRP2040 : public arduino::HardwareSPI {
108108
109109
110110 /* *
111- @brief Begin an SPI transaction, sets SPI speed and masks necessary interrupts
111+ @brief Begin an SPI transaction, sets SPI speed and masks necessary interrupts
112112
113- @param [in] SPISettings SPI configuration parameters, including the clock speed
113+ @param [in] SPISettings SPI configuration parameters, including the clock speed
114114 */
115115 void beginTransaction (SPISettings settings) override ;
116116
117117 /* *
118- @brief Ends an SPI transaction, unmasks and masked GPIO interrupts
118+ @brief Ends an SPI transaction, unmasks and masked GPIO interrupts
119119 */
120120 void endTransaction (void ) override ;
121121
122122 /* *
123- @brief Sets the MISO(RX) pin. Call before begin()
123+ @brief Sets the MISO(RX) pin. Call before begin()
124124
125- @param [in] pin The GPIO number to assign to
126- @returns True on success
125+ @param [in] pin The GPIO number to assign to or NOPIN
126+ @returns True on success
127127 */
128128 bool setRX (pin_size_t pin);
129129
130130 /* *
131- @brief Sets the MISO(RX) pin. Call before begin()
131+ @brief Sets the MISO(RX) pin. Call before begin()
132132
133- @param [in] pin The GPIO number to assign to
134- @returns True on success
133+ @param [in] pin The GPIO number to assign to
134+ @returns True on success
135135 */
136136 inline bool setMISO (pin_size_t pin) {
137137 return setRX (pin);
138138 }
139139
140140 /* *
141- @brief Sets the CS pin. Call before begin()
141+ @brief Sets the CS pin. Call before begin()
142142
143- @param [in] pin The GPIO number to assign to
144- @returns True on success
143+ @param [in] pin The GPIO number to assign to
144+ @returns True on success
145145 */
146146 bool setCS (pin_size_t pin);
147147
148148 /* *
149- @brief Sets the SCK pin. Call before begin()
149+ @brief Sets the SCK pin. Call before begin()
150150
151- @param [in] pin The GPIO number to assign to
152- @returns True on success
151+ @param [in] pin The GPIO number to assign to
152+ @returns True on success
153153 */
154154 bool setSCK (pin_size_t pin);
155155
156156 /* *
157- @brief Sets the MOSI(TX) pin. Call before begin()
157+ @brief Sets the MOSI(TX) pin. Call before begin()
158158
159- @param [in] pin The GPIO number to assign to
160- @returns True on success
159+ @param [in] pin The GPIO number to assign to
160+ @returns True on success
161161 */
162162 bool setTX (pin_size_t pin);
163163
164164 /* *
165- @brief Sets the MOSI(TX) pin. Call before begin()
165+ @brief Sets the MOSI(TX) pin. Call before begin()
166166
167- @param [in] pin The GPIO number to assign to
168- @returns True on success
167+ @param [in] pin The GPIO number to assign to or NOPIN
168+ @returns True on success
169169 */
170170 inline bool setMOSI (pin_size_t pin) {
171171 return setTX (pin);
172172 }
173173
174174 /* *
175- @brief Call once to init/deinit SPI class, select pins, etc.
175+ @brief Call once to init/deinit SPI class, select pins, etc.
176176 */
177177 virtual void begin () override {
178178 begin (false );
179179 }
180180
181181 /* *
182- @brief Call once to init/deinit SPI class, select pins, etc.
182+ @brief Call once to init/deinit SPI class, select pins, etc.
183183
184- @param [in] hwCS Pass in true to enable HW-controlled CS. Otherwise application needs to assert/deassert CS.
184+ @param [in] hwCS Pass in true to enable HW-controlled CS. Otherwise application needs to assert/deassert CS.
185185 */
186186 void begin (bool hwCS);
187187
188188 /* *
189- @brief Call to deinit and disable the SPI interface.
189+ @brief Call to deinit and disable the SPI interface.
190190 */
191191 void end () override ;
192192
193193 /* *
194- @brief Deprecated, do not use
194+ @brief Deprecated, do not use
195195
196- @param [in] order Deprecated
196+ @param [in] order Deprecated
197197 */
198198 void setBitOrder (BitOrder order) __attribute__((deprecated));
199199
200200 /* *
201- @brief Deprecated, do not use
201+ @brief Deprecated, do not use
202202
203- @param [in] order Deprecated
203+ @param [in] order Deprecated
204204 */
205205 void setDataMode (uint8_t uc_mode) __attribute__((deprecated));
206206
207207 /* *
208- @brief Deprecated, do not use
208+ @brief Deprecated, do not use
209209
210- @param [in] order Deprecated
210+ @param [in] order Deprecated
211211 */
212212 void setClockDivider (uint8_t uc_div) __attribute__((deprecated));
213213
214214 /* *
215- @brief Ensure specific GPIO interrupt is disabled during and SPI transaction to protect against re-entrancy. Multiple GPIOs supported by multiple calls.
215+ @brief Ensure specific GPIO interrupt is disabled during and SPI transaction to protect against re-entrancy. Multiple GPIOs supported by multiple calls.
216216
217- @param [in] interruptNumber GPIO pin to mask
217+ @param [in] interruptNumber GPIO pin to mask
218218 */
219219 virtual void usingInterrupt (int interruptNumber) override {
220220 _helper.usingInterrupt (interruptNumber);
221221 }
222222
223223 /* *
224- @brief Remove a GPIO from the masked-during-transaction list.
224+ @brief Remove a GPIO from the masked-during-transaction list.
225225
226- @param [in] interruptNumber GPIO pin to unmask
226+ @param [in] interruptNumber GPIO pin to unmask
227227 */
228228 virtual void notUsingInterrupt (int interruptNumber) override {
229229 _helper.notUsingInterrupt (interruptNumber);
230230 }
231231
232232 /* *
233- @brief Deprecated, do not use
233+ @brief Deprecated, do not use
234234 */
235235 virtual void attachInterrupt () override __attribute__((deprecated)) { /* noop */ }
236236
237237 /* *
238- @brief Deprecated, do not use
238+ @brief Deprecated, do not use
239239 */
240240 virtual void detachInterrupt () override __attribute__((deprecated)) { /* noop */ }
241241
0 commit comments