Beetle board is built to optimize power consumption therefore does not
provide on-board LEDs.
This patch adds a comment in PinNames in order to clarify that the
Emulated LEDs are provided for compatibility reasons with the MBED test
suite.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
The LF clock initialization is already handled by the SystemInit function.
This code was causing troubles when run on targets with an alternate LF
clock.
MBED OS requires an us_ticker_read function that returns a 32bit
value in microseconds. This can not be represented directly on
the Beetle Timer Load register.
max_us_on_reg = (0xFFFFFFFF ticks)/DIVIDER_US
This patch introduces an intermediate layer that counts the timer wraps
around and returns the correct value of us to the MBED library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
MBED OS requires an lp_ticker_read function that returns a 32bit
value in microseconds. This can not be represented directly on
the Beetle Dual Timer Load register.
max_us_on_reg = (0xFFFFFFFF ticks)/DIVIDER_US
This patch introduces an intermediate layer that counts the timer wraps
around and returns the correct value of us to the MBED library.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Before, the following results in a compilation error:
const struct Object *obj;
void obj_doit(const Object *obj);
Callback<void()> cb(obj, obj_doit);
This is especially noticable when migrating from the old Thread
constructor, which previously _required_ const.
Short term fix for all cv qualifiers through a C cast:
void *_obj = (void*)obj;
FunctionPointer/FunctionPointerArg0/FunctionPointerArg1 has been
replaced by the more flexible Callback template class.
For the motivation behind adopting the Callback class:
https://github.com/mbedmicro/mbed/pull/1783
Create the wrapper class SingletonPtr. This provides a safe way to
declare and use singletons. This class allows both the lazy
initialization of a singleton, and allows the singleton to be
garbage collected by the linker if it is never referenced.
This patch also updates the HAL to use SingletonPtr when declaring
singleton mutexes.
Set the channel mux before taking a reading rather than on
initialization. This allows ADC pins on both mux A and B to be used in
the same application.
This commit adds hardware flow control capabilities for the K64F family
of MCUs. This is a backport of these commits:
9bfcfd057277042cc945
with a few changes:
- since the current version of KSDK doesn't seem to have APIs for
manipulating the flow control settings, we change the peripheral
registers directly.
- updated pin maps for RTS/CTS in accordance to the K64F datasheet.
- uint32_t -> void *
- void ** -> uint32_t *
For whatever reason `uintptr_t` and `uint32_t` expand to incompatible
types `unsigned int` and `unsigned long int`. This is implicitely casted
when passed by value, but causes a warning in gcc and error in iar when
passed by pointer.
This issue is not present on x86_32 gcc