diff options
Diffstat (limited to 'os/hal/templates/gpt_lld.c')
-rw-r--r-- | os/hal/templates/gpt_lld.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/os/hal/templates/gpt_lld.c b/os/hal/templates/gpt_lld.c index d892d281a..6ba3aea27 100644 --- a/os/hal/templates/gpt_lld.c +++ b/os/hal/templates/gpt_lld.c @@ -39,6 +39,11 @@ /* Driver exported variables. */
/*===========================================================================*/
+/** @brief GPTD1 driver identifier.*/
+#if PLATFORM_GPT_USE_GPT1 || defined(__DOXYGEN__)
+GPTDriver GPTD1;
+#endif
+
/*===========================================================================*/
/* Driver local variables. */
/*===========================================================================*/
@@ -62,6 +67,10 @@ */
void gpt_lld_init(void) {
+#if PLATFORM2_GPT_USE_TIM1
+ /* Driver initialization.*/
+ gptObjectInit(&GPTD1);
+#endif
}
/**
@@ -72,13 +81,17 @@ void gpt_lld_init(void) { * @notapi
*/
void gpt_lld_start(GPTDriver *gptp) {
- uint16_t psc;
if (gptp->state == GPT_STOP) {
- /* Clock activation.*/
+ /* Enables the pehipheral.*/
+#if PLATFORM_GPT_USE_GPT1
+ if (&GPTD1 == gptp) {
+ }
+#endif /* PLATFORM_GPT_USE_GPT1 */
}
- /* Configuration.*/
+ /* Configures the peripheral.*/
+
}
/**
@@ -91,8 +104,14 @@ void gpt_lld_start(GPTDriver *gptp) { void gpt_lld_stop(GPTDriver *gptp) {
if (gptp->state == GPT_READY) {
- /* Clock de-activation.*/
+ /* Resets the peripheral.*/
+
+ /* Disables the peripheral.*/
+#if PLATFORM_GPT_USE_GPT1
+ if (&GPTD1 == gptp) {
+ }
+#endif /* PLATFORM_GPT_USE_GPT1 */
}
}
@@ -100,11 +119,11 @@ void gpt_lld_stop(GPTDriver *gptp) { * @brief Starts the timer in continuous mode.
*
* @param[in] gptp pointer to the @p GPTDriver object
- * @param[in] period period in ticks
+ * @param[in] interval period in ticks
*
* @notapi
*/
-void gpt_lld_start_timer(GPTDriver *gptp, gptcnt_t period) {
+void gpt_lld_start_timer(GPTDriver *gptp, gptcnt_t interval) {
}
|