Skip to content

Commit 81c0b7d

Browse files
committed
Fix UART malloc for ports/analog BUSIO
- Remove excess argument from UART ringbuf malloc call - Remove unused err and intfl0 in I2C driver to remove warnings Signed-off-by: Brandon-Hurst <[email protected]>
1 parent e681c44 commit 81c0b7d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ports/analog/common-hal/busio/I2C.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
4747
const mcu_pin_obj_t *sda,
4848
uint32_t frequency, uint32_t timeout) {
4949

50-
int temp, err = 0;
50+
int temp = 0;
5151

5252
// Check for NULL Pointers && valid I2C settings
5353
assert(self);
@@ -113,7 +113,7 @@ void common_hal_busio_i2c_deinit(busio_i2c_obj_t *self) {
113113

114114
// Probe device in I2C bus
115115
bool common_hal_busio_i2c_probe(busio_i2c_obj_t *self, uint8_t addr) {
116-
uint32_t int_fl0, int_fl1;
116+
uint32_t int_fl0;
117117
bool ret = 0;
118118

119119
// Clear FIFOs & all interrupt flags

ports/analog/common-hal/busio/UART.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
239239

240240
// Initialize ringbuffer
241241
if (receiver_buffer == NULL) {
242-
self->ringbuf = m_malloc_without_collect(receiver_buffer_size, false);
242+
self->ringbuf = m_malloc_without_collect(receiver_buffer_size);
243243
if (!ringbuf_alloc(self->ringbuf, receiver_buffer_size)) {
244244
m_malloc_fail(receiver_buffer_size);
245245
mp_raise_RuntimeError(MP_ERROR_TEXT("ERR: Could not init ringbuffer\n"));

0 commit comments

Comments
 (0)