]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/libchip_sama5d4x/include/pwmc.h
Core kernel files:
[freertos] / FreeRTOS / Demo / CORTEX_A5_SAMA5D4x_EK_IAR / AtmelFiles / libchip_sama5d4x / include / pwmc.h
diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/libchip_sama5d4x/include/pwmc.h b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/AtmelFiles/libchip_sama5d4x/include/pwmc.h
new file mode 100644 (file)
index 0000000..000533f
--- /dev/null
@@ -0,0 +1,96 @@
+/* ----------------------------------------------------------------------------\r
+ *         SAM Software Package License \r
+ * ----------------------------------------------------------------------------\r
+ * Copyright (c) 2011, Atmel Corporation\r
+ *\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions are met:\r
+ *\r
+ * - Redistributions of source code must retain the above copyright notice,\r
+ * this list of conditions and the disclaimer below.\r
+ *\r
+ * Atmel's name may not be used to endorse or promote products derived from\r
+ * this software without specific prior written permission.\r
+ *\r
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR\r
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE\r
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,\r
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\r
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ * ----------------------------------------------------------------------------\r
+ */\r
+\r
+/**\r
+ * \file\r
+ *\r
+ * \par Purpose\r
+ *\r
+ * Interface for configuration the Pulse Width Modulation Controller (PWM) peripheral.\r
+ *\r
+ * \par Usage\r
+ *\r
+ *    -# Configures PWM clocks A & B to run at the given frequencies using\r
+ *       \ref PWMC_ConfigureClocks().\r
+ *    -# Configure PWMC channel using \ref PWMC_ConfigureChannel(), \ref PWMC_ConfigureChannelExt()\r
+ *       \ref PWMC_SetPeriod(), \ref PWMC_SetDutyCycle() and \ref PWMC_SetDeadTime().\r
+ *    -# Enable & disable channel using \ref PWMC_EnableChannel() and\r
+ *       \ref PWMC_DisableChannel().\r
+ *    -# Enable & disable the period interrupt for the given PWM channel using\r
+ *       \ref PWMC_EnableChannelIt() and \ref PWMC_DisableChannelIt().\r
+ *    -# Enable & disable the selected interrupts sources on a PWMC peripheral\r
+ *       using  \ref PWMC_EnableIt() and \ref PWMC_DisableIt().\r
+ *    -# Control syncronous channel using \ref PWMC_ConfigureSyncChannel(),\r
+ *       \ref PWMC_SetSyncChannelUpdatePeriod() and \ref PWMC_SetSyncChannelUpdateUnlock().\r
+ *    -# Control PWM override output using \ref PWMC_SetOverrideValue(),\r
+ *       \ref PWMC_EnableOverrideOutput() and \ref PWMC_DisableOverrideOutput().\r
+ *    -# Send data through the transmitter using \ref PWMC_WriteBuffer().\r
+ *\r
+ */\r
+\r
+#ifndef _PWMC_\r
+#define _PWMC_\r
+\r
+/*----------------------------------------------------------------------------\r
+ *        Headers\r
+ *----------------------------------------------------------------------------*/\r
+\r
+#include "chip.h"\r
+\r
+#include <stdint.h>\r
+\r
+#ifdef __cplusplus\r
+ extern "C" {\r
+#endif\r
+\r
+/*----------------------------------------------------------------------------\r
+ *        Exported functions\r
+ *----------------------------------------------------------------------------*/\r
+extern void PWMC_ConfigureClocks(Pwm* pPwm, uint32_t mode);\r
+\r
+extern void PWMC_EnableChannel(Pwm* pPwm,uint8_t channel);\r
+\r
+extern void PWMC_DisableChannel(Pwm* pPwm,uint8_t channel);\r
+\r
+extern void PWMC_EnableChannelIt(Pwm* pPwm,uint8_t channel);\r
+\r
+extern void PWMC_DisableChannelIt(Pwm* pPwm,uint8_t channel);\r
+\r
+extern void PWMC_ConfigureChannel(Pwm* pPwm,uint8_t channel,uint32_t mode);\r
+\r
+extern void PWMC_SetPeriod( Pwm* pPwm, uint8_t channel, uint16_t period);\r
+\r
+extern void PWMC_SetDutyCycle( Pwm* pPwm, uint8_t channel, uint16_t duty);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* #ifndef _PWMC_ */\r
+\r