mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: targets/TARGET_Cypress/TARGET_PSOC6/objects.h
- Revision:
- 189:f392fc9709a3
- Parent:
- 188:bcfe06ba3d64
--- a/targets/TARGET_Cypress/TARGET_PSOC6/objects.h Thu Nov 08 11:46:34 2018 +0000 +++ b/targets/TARGET_Cypress/TARGET_PSOC6/objects.h Wed Feb 20 22:31:08 2019 +0000 @@ -1,6 +1,8 @@ /* * mbed Microcontroller Library * Copyright (c) 2017-2018 Future Electronics + * Copyright (c) 2018-2019 Cypress Semiconductor Corporation + * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,8 +27,8 @@ #include "gpio_irq_api.h" #include "gpio_object.h" -#include "drivers/peripheral/sysclk/cy_sysclk.h" -#include "drivers/peripheral/syspm/cy_syspm.h" +#include "cy_sysclk.h" +#include "cy_syspm.h" #ifdef __cplusplus extern "C" { @@ -34,7 +36,7 @@ #if DEVICE_INTERRUPTIN struct gpio_irq_s { - GPIO_PRT_Type* port; + GPIO_PRT_Type *port; uint32_t port_id; uint32_t pin; gpio_irq_event mode; @@ -69,6 +71,7 @@ struct serial_s { CySCB_Type *base; uint32_t serial_id; + bool already_reserved; PinName pin_rx; PinName pin_tx; PinName pin_cts; @@ -86,7 +89,7 @@ bool tx_pending; cy_israddress async_handler; #endif // DEVICE_SERIAL_ASYNCH -#if DEVICE_SLEEP && DEVICE_LOWPOWERTIMER +#if DEVICE_SLEEP && DEVICE_LPTICKER cy_stc_syspm_callback_params_t pm_callback_params; cy_stc_syspm_callback_t pm_callback_handler; #endif @@ -99,6 +102,7 @@ struct spi_s { CySCB_Type *base; uint32_t spi_id; + bool already_reserved; PinName pin_miso; PinName pin_mosi; PinName pin_sclk; @@ -124,7 +128,7 @@ void *tx_buffer; uint32_t tx_buffer_size; #endif // DEVICE_SPI_ASYNCH -#if DEVICE_SLEEP && DEVICE_LOWPOWERTIMER +#if DEVICE_SLEEP && DEVICE_LPTICKER cy_stc_syspm_callback_params_t pm_callback_params; cy_stc_syspm_callback_t pm_callback_handler; #endif @@ -137,6 +141,7 @@ struct i2c_s { CySCB_Type *base; uint32_t i2c_id; + bool already_reserved; PinName pin_sda; PinName pin_scl; en_clk_dst_t clock; @@ -160,7 +165,7 @@ uint16_t events; uint32_t handler; #endif // DEVICE_I2C_ASYNCH -#if DEVICE_SLEEP && DEVICE_LOWPOWERTIMER +#if DEVICE_SLEEP && DEVICE_LPTICKER cy_stc_syspm_callback_params_t pm_callback_params; cy_stc_syspm_callback_t pm_callback_handler; #endif @@ -171,42 +176,42 @@ #include "cy_tcpwm.h" struct pwmout_s { - TCPWM_Type *base; - PinName pin; - uint32_t counter_id; - uint32_t clock; - uint32_t period; - uint32_t pulse_width; - uint32_t prescaler; -#if DEVICE_SLEEP && DEVICE_LOWPOWERTIMER - cy_stc_syspm_callback_params_t pm_callback_params; - cy_stc_syspm_callback_t pm_callback_handler; + TCPWM_Type *base; + PinName pin; + uint32_t counter_id; + en_clk_dst_t clock; + uint32_t period; + uint32_t pulse_width; + uint32_t prescaler; +#if DEVICE_SLEEP && DEVICE_LPTICKER + cy_stc_syspm_callback_params_t pm_callback_params; + cy_stc_syspm_callback_t pm_callback_handler; #endif }; #endif // DEVICE_PWMOUT -#ifdef DEVICE_ANALOGIN +#if DEVICE_ANALOGIN #include "cy_sar.h" struct analogin_s { SAR_Type *base; PinName pin; uint32_t channel_mask; - uint32_t clock; + en_clk_dst_t clock; }; #endif // DEVICE_ANALOGIN -#ifdef DEVICE_ANALOGOUT +#if DEVICE_ANALOGOUT #include "cy_ctdac.h" struct dac_s { CTDAC_Type *base; PinName pin; - uint32_t clock; + en_clk_dst_t clock; }; #endif // DEVICE_ANALOGOUT -#ifdef DEVICE_FLASH +#if DEVICE_FLASH struct flash_s { /* nothing to be stored for now */ void *dummy;