Merge remote-tracking branch 'adafruit/main' into busio-uart-rp

This commit is contained in:
Scott Shawcroft 2021-02-26 09:04:42 -08:00
commit 7c8d7d77dd
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
3 changed files with 5 additions and 10 deletions

View File

@ -30,10 +30,6 @@
#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h"
void board_init(void) {
common_hal_never_reset_pin(&pin_GPIO17);
gpio_init(17);
gpio_set_dir(17, GPIO_OUT);
gpio_put(17, true);
}
bool board_requests_safe_mode(void) {

View File

@ -14,12 +14,12 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) },
@ -27,7 +27,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },

View File

@ -640,9 +640,9 @@ static bool _transfer(rp2pio_statemachine_obj_t *self,
while (tx_remaining && !pio_sm_is_tx_fifo_full(self->pio, self->state_machine)) {
if (out_stride_in_bytes == 1) {
*tx_destination = *data_out;
} else if (in_stride_in_bytes == 2) {
} else if (out_stride_in_bytes == 2) {
*((uint16_t*) tx_destination) = *((uint16_t*) data_out);
} else if (in_stride_in_bytes == 4) {
} else if (out_stride_in_bytes == 4) {
*((uint32_t*) tx_destination) = *((uint32_t*) data_out);
}
data_out += out_stride_in_bytes;