Skip to content

Commit 9a5397e

Browse files
committed
cleanup
1 parent 6b08448 commit 9a5397e

File tree

2 files changed

+6
-6
lines changed
  • src/rp2_common
    • hardware_i2c/include/hardware
    • hardware_pio/include/hardware

2 files changed

+6
-6
lines changed

src/rp2_common/hardware_i2c/include/hardware/i2c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static inline void i2c_read_raw_blocking(i2c_inst_t *i2c, uint8_t *dst, size_t l
316316
* \ingroup hardware_i2c
317317
*
318318
* \param i2c Either \ref i2c0 or \ref i2c1
319-
* \param is_tx true for sending data to the I2C instance, false for received data from the I2C instance
319+
* \param is_tx true for sending data to the I2C instance, false for receiving data from the I2C instance
320320
*/
321321
static inline uint i2c_get_dreq(i2c_inst_t *i2c, bool is_tx) {
322322
static_assert(DREQ_I2C0_RX == DREQ_I2C0_TX + 1, "");

src/rp2_common/hardware_pio/include/hardware/pio.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,11 +444,11 @@ static inline void pio_gpio_init(PIO pio, uint pin) {
444444
* \param is_tx true for sending data to the state machine, false for received data from the state machine
445445
*/
446446
static inline uint pio_get_dreq(PIO pio, uint sm, bool is_tx) {
447-
static_assert(DREQ_PIO0_TX1 - DREQ_PIO0_TX0 == 1, "");
448-
static_assert(DREQ_PIO0_TX2 - DREQ_PIO0_TX0 == 2, "");
449-
static_assert(DREQ_PIO0_TX3 - DREQ_PIO0_TX0 == 3, "");
450-
static_assert(DREQ_PIO0_RX0 - DREQ_PIO0_TX0 == NUM_PIO_STATE_MACHINES, "");
451-
static_assert(DREQ_PIO1_RX0 - DREQ_PIO1_TX0 == NUM_PIO_STATE_MACHINES, "");
447+
static_assert(DREQ_PIO0_TX1 == DREQ_PIO0_TX0 + 1, "");
448+
static_assert(DREQ_PIO0_TX2 == DREQ_PIO0_TX0 + 2, "");
449+
static_assert(DREQ_PIO0_TX3 == DREQ_PIO0_TX0 + 3, "");
450+
static_assert(DREQ_PIO0_RX0 == DREQ_PIO0_TX0 + NUM_PIO_STATE_MACHINES, "");
451+
static_assert(DREQ_PIO1_RX0 == DREQ_PIO1_TX0 + NUM_PIO_STATE_MACHINES, "");
452452
check_pio_param(pio);
453453
check_sm_param(sm);
454454
return sm + (is_tx ? 0 : NUM_PIO_STATE_MACHINES) + (pio == pio0 ? DREQ_PIO0_TX0 : DREQ_PIO1_TX0);

0 commit comments

Comments
 (0)