Skip to content

LPC55S69: Fix UART & GPIO HAL to pass FPGA CI test shield tests #12342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2020 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -189,10 +189,10 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_not_empty, uint32_t index)
{
if (serial_irq_ids[index] != 0) {
if (transmit_empty)
if (transmit_empty && (uart_addrs[index]->FIFOINTENSET & kUSART_TxLevelInterruptEnable))
irq_handler(serial_irq_ids[index], TxIrq);

if (receive_not_empty)
if (receive_not_empty && (uart_addrs[index]->FIFOINTENSET & kUSART_RxLevelInterruptEnable))
irq_handler(serial_irq_ids[index], RxIrq);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,24 @@

#include "PeripheralPins.h"
#include "PeripheralPinMaps.h"

// List of GPIOs with limited functionality
const PinList *pinmap_gpio_restricted_pins()
{
static const PinName pins[] = {
A4, // fixed pull-up (for I2C)
A5, // fixed pull-up (for I2C)
D5, // fixed pull-up (for LED)
D3, // fixed pull-up (for LED)
D4, // fixed pull-up (for LED)
D7, // fixed pull-up
D15, // fixed pull-up (for I2C)
D14 // fixed pull-up (for I2C)
};

static const PinList pin_list = {
sizeof(pins) / sizeof(pins[0]),
pins
};
return &pin_list;
}