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:
324:406fd2029f23
Parent:
149:1fb5f62b92bd
--- a/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/dmamux/fsl_dmamux_hal.h	Mon Sep 15 15:30:06 2014 +0100
+++ b/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/dmamux/fsl_dmamux_hal.h	Thu Sep 18 14:00:17 2014 +0100
@@ -70,67 +70,40 @@
  *
  * Initializes the DMAMUX module to the reset state.
  *
- * @param module DMAMUX module index
+ * @param baseAddr Register base address for DMAMUX module.
  */
-void dmamux_hal_init(uint8_t module);
+void DMAMUX_HAL_Init(uint32_t baseAddr);
 
 /*!
- * @brief Enables the DMAMUX channel.
+ * @brief Enables/Disables the DMAMUX channel.
  *
  * Enables the hardware request. If enabled, the hardware request is  sent to
  * the corresponding DMA channel.
  *
- * @param module DMAMUX module.
- * @param channel DMAMUX channel.
+ * @param baseAddr Register base address for DMAMUX module.
+ * @param channel DMAMUX channel number.
+ * @param enable Enables (true) or Disables (false) DMAMUX channel.
  */
-static inline void dmamux_hal_enable_channel(uint8_t module, uint8_t channel)
+static inline void DMAMUX_HAL_SetChannelCmd(uint32_t baseAddr, uint32_t channel, bool enable)
 {
-    assert(module < HW_DMAMUX_INSTANCE_COUNT);
     assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
-    BW_DMAMUX_CHCFGn_ENBL(module, channel, 1U);
-}
-
-/*!
- * @brief Disables the DMAMUX channel.
- *
- * Disable hardware request. If disabled, the hardware request  is not  sent to
- * the corresponding DMA channel.
- *
- * @param module DMAMUX module.
- * @param channel DMAMUX channel.
- */
-static inline void dmamux_hal_disable_channel(uint8_t module, uint8_t channel)
-{
-    assert(module < HW_DMAMUX_INSTANCE_COUNT);
-    assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
-    BW_DMAMUX_CHCFGn_ENBL(module, channel, 0U);
+    BW_DMAMUX_CHCFGn_ENBL(baseAddr, channel, enable);
 }
 
+
 /*!
- * @brief Enables the period trigger.
+ * @brief Enables/Disables the period trigger.
  *
- * @param module DMAMUX module.
- * @param channel DMAMUX channel.
+ * @param baseAddr Register base address for DMAMUX module.
+ * @param channel DMAMUX channel number.
+ * @param enable Enables (true) or Disables (false) period trigger.
  */
-static inline void dmamux_hal_enable_period_trigger(uint8_t module, uint8_t channel)
+static inline void DMAMUX_HAL_SetPeriodTriggerCmd(uint32_t baseAddr, uint32_t channel, bool enable)
 {
-    assert(module < HW_DMAMUX_INSTANCE_COUNT);
     assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
-    BW_DMAMUX_CHCFGn_TRIG(module, channel, 1U);
+    BW_DMAMUX_CHCFGn_TRIG(baseAddr, channel, enable);
 }
 
-/*!
- * @brief Disables the period trigger.
- *
- * @param module DMAMUX module.
- * @param channel DMAMUX channel.
- */
-static inline void dmamux_hal_disable_period_trigger(uint8_t module, uint8_t channel)
-{
-    assert(module < HW_DMAMUX_INSTANCE_COUNT);
-    assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
-    BW_DMAMUX_CHCFGn_TRIG(module, channel, 0U);
-}
 
 /*!
  * @brief Configures the DMA request for the DMAMUX channel.
@@ -138,15 +111,14 @@
  * Sets the trigger source for the DMA channel. The trigger source is in the file
  * fsl_dma_request.h.
  *
- * @param module DMAMUX module.
- * @param channel DMAMUX channel.
+ * @param baseAddr Register base address for DMAMUX module.
+ * @param channel DMAMUX channel number.
  * @param source DMA request source.
  */
-static inline void dmamux_hal_set_trigger_source(uint8_t module, uint8_t channel, uint8_t source)
+static inline void DMAMUX_HAL_SetTriggerSource(uint32_t baseAddr, uint32_t channel, uint8_t source)
 {
-    assert(module < HW_DMAMUX_INSTANCE_COUNT);
     assert(channel < FSL_FEATURE_DMAMUX_MODULE_CHANNEL);
-    BW_DMAMUX_CHCFGn_SOURCE(module, channel, source);
+    BW_DMAMUX_CHCFGn_SOURCE(baseAddr, channel, source);
 }
 
 /* @} */