mbed library sources
Dependents: Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more
Superseded
This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.
Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.
If you are looking for a stable and tested release, please import one of the official mbed library releases:
Import librarymbed
The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Revision 150:49699a7d7064, committed 2014-04-04
- Comitter:
- mbed_official
- Date:
- Fri Apr 04 10:45:08 2014 +0100
- Parent:
- 149:1fb5f62b92bd
- Child:
- 151:7a600087bf72
- Commit message:
- Synchronized with git revision d4566711265f6e274f03a79a4819636519bf3a42
Full URL: https://github.com/mbedmicro/mbed/commit/d4566711265f6e274f03a79a4819636519bf3a42/
K64F - port HAL corrections, pwm clock configuration store
Changed in this revision
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/port_api.c Thu Apr 03 11:45:06 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/port_api.c Fri Apr 04 10:45:08 2014 +0100 @@ -46,18 +46,22 @@ } void port_dir(port_t *obj, PinDirection dir) { + uint32_t direction = gpio_hal_get_port_direction((uint32_t)obj->port); switch (dir) { case PIN_INPUT : - gpio_hal_set_port_direction((uint32_t)obj->port, kGpioDigitalInput); + direction &= ~obj->mask; + gpio_hal_set_port_direction((uint32_t)obj->port, direction); break; case PIN_OUTPUT: - gpio_hal_set_port_direction((uint32_t)obj->port, kGpioDigitalOutput); + direction |= obj->mask; + gpio_hal_set_port_direction((uint32_t)obj->port, direction); break; } } void port_write(port_t *obj, int value) { - gpio_hal_write_port_output((uint32_t)obj->port, (uint32_t)(value & obj->mask)); + uint32_t input = gpio_hal_read_port_input((uint32_t)obj->port) & ~obj->mask; + gpio_hal_write_port_output((uint32_t)obj->port, input | (uint32_t)(value & obj->mask)); } int port_read(port_t *obj) {
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/pwmout_api.c Thu Apr 03 11:45:06 2014 +0100 +++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_K64F/pwmout_api.c Fri Apr 04 10:45:08 2014 +0100 @@ -87,9 +87,12 @@ break; } } + + pwm_clock = clkval; uint32_t channel = pwm & 0xF; uint32_t instance = pwm >> TPM_SHIFT; clock_manager_set_gate(kClockModuleFTM, instance, true); + ftm_hal_set_tof_frequency(instance, 3); ftm_hal_set_clock_ps(instance, (ftm_clock_ps_t)clkdiv); ftm_hal_set_clock_source(instance, kClock_source_FTM_SystemClk); ftm_hal_set_channel_edge_level(instance, channel, 2);