1 /**
2 ******************************************************************************
3 * @file tae32f53xx_ll_dali.c
4 * @author MCD Application Team
5 * @brief Source file for DALI module
6 *
7 ******************************************************************************
8 * @attention
9 *
10 * <h2><center>© Copyright (c) 2020 Tai-Action.
11 * All rights reserved.</center></h2>
12 *
13 * This software is licensed by Tai-Action under BSD 3-Clause license,
14 * the "License"; You may not use this file except in compliance with the
15 * License. You may obtain a copy of the License at:
16 * opensource.org/licenses/BSD-3-Clause
17 *
18 ******************************************************************************
19 */
20
21 /* Includes ------------------------------------------------------------------*/
22 #include "tae32f53xx_ll.h"
23
24
25 #define DBG_TAG "DALI LL"
26 #define DBG_LVL DBG_ERROR
27 #include "dbg/tae32f53xx_dbg.h"
28
29
30 /** @addtogroup TAE32F53xx_LL_Driver
31 * @{
32 */
33
34 /** @defgroup DALI_LL DALI LL
35 * @brief DALI LL module driver.
36 * @{
37 */
38
39 #ifdef LL_DALI_MODULE_ENABLED
40
41 /* Private define ------------------------------------------------------------*/
42 /* Private macro -------------------------------------------------------------*/
43 /* Private typedef -----------------------------------------------------------*/
44 /* Private variables ---------------------------------------------------------*/
45 /* Private function prototypes -----------------------------------------------*/
46 /* Exported functions --------------------------------------------------------*/
47 /** @defgroup DALI_LL_Exported_Functions DALI LL Exported Functions
48 * @brief DALI LL Exported Functions
49 * @{
50 */
51
52 /** @defgroup DALI_LL_Exported_Functions_Group1 Initialization and De-Initialization functions
53 * @brief Initialization and De-Initialization functions
54 @verbatim
55 ==============================================================================
56 ##### Initialization and De-Initialization functions #####
57 ==============================================================================
58 [..]
59 This section provides functions allowing to:
60 (+) Initialize and configure the DALI Module.
61 (+) De-initialize the DALI Module.
62 @endverbatim
63 * @{
64 */
65
66 /**
67 * @brief Initialize the DALI peripheral
68 * @param Instance DALI peripheral instance
69 * @param Init pointer to a DALI_InitTypeDef structure that contains the configuration
70 * information for the specified DALI peripheral.
71 * @return status of the initialization
72 */
LL_DALI_Init(DALI_TypeDef * Instance,DALI_InitTypeDef * Init)73 LL_StatusETypeDef LL_DALI_Init(DALI_TypeDef *Instance, DALI_InitTypeDef *Init)
74 {
75 uint32_t prescaler = LL_SYSCTRL_APB1ClkGet() / 16 / Init->Baudrate;
76
77 /* Check the parameters */
78 assert_param(IS_DALI_ALL_INSTANCE(Instance));
79 assert_param(Init != NULL);
80 assert_param(IS_DALI_MODE(Init->Mode));
81 assert_param(IS_DALI_MESSAGE_LEN(Init->MessageLen));
82 assert_param(IS_DALI_POLARITY(Init->Polarity));
83 assert_param(IS_DALI_FILTER_ENABLE(Init->Filter));
84 assert_param(IS_DALI_FORWARD_DELAY(Init->ForwardDelay));
85 assert_param(IS_DALI_BACKWARD_DELAY(Init->BackwardDelay));
86 assert_param(IS_DALI_BAUDRATE(Init->Baudrate));
87 assert_param(IS_DALI_PRESCALE(prescaler));
88
89 /* Handle Something */
90 LL_DALI_MspInit(Instance);
91
92 /* Disable DALI before configuration */
93 __LL_DALI_DISABLE(Instance);
94
95 /* Clear all pending flags */
96 __LL_DALI_PENDING_FLAG_CLEAR(Instance, (DALI_FLAG_BEIF
97 | DALI_FLAG_FEIF
98 | DALI_FLAG_BDIF
99 | DALI_FLAG_FDIF));
100
101 /* Configures: Forward frame message length, Polarity, Working mode */
102 WRITE_REG(Instance->CR, (Init->MessageLen | Init->Polarity | Init->Mode));
103
104 /* Configures: Filter feature enable, Filter counter value */
105 if (Init->Filter == DALI_FILTER_ENABLE) {
106 assert_param(IS_DALI_FILTER_COUNTER(Init->FilterCounter));
107
108 WRITE_REG(Instance->FCR, (Init->Filter | Init->FilterCounter));
109 } else {
110 WRITE_REG(Instance->FCR, 0);
111 }
112
113 /* Configures: Prescaler */
114 WRITE_REG(Instance->PSCR, (DALI_PSCR_FTR_Msk | (prescaler & DALI_PSCR_PSC_Msk)));
115
116 /* Configures: Timing control */
117 WRITE_REG(Instance->TCR, ((Init->BackwardDelay << 16)
118 | (Init->ForwardDelay)));
119
120 /* Enable DALI module */
121 __LL_DALI_ENABLE(Instance);
122
123 /* Return function status */
124 return LL_OK;
125 }
126
127 /**
128 * @brief DeInitializes the DALI
129 * @param Instance DALI peripheral instance
130 * @return status of the initialization
131 */
LL_DALI_DeInit(DALI_TypeDef * Instance)132 LL_StatusETypeDef LL_DALI_DeInit(DALI_TypeDef *Instance)
133 {
134 /* Check the parameters */
135 assert_param(IS_DALI_ALL_INSTANCE(Instance));
136
137 /* Disable DALI before configuration */
138 __LL_DALI_DISABLE(Instance);
139
140 /* Handle Something */
141 LL_DALI_MspDeInit(Instance);
142
143 /* Return function status */
144 return LL_OK;
145 }
146
147 /**
148 * @brief Initializes the DALI MSP.
149 * @param Instance DALI peripheral
150 * @return None
151 */
LL_DALI_MspInit(DALI_TypeDef * Instance)152 __WEAK void LL_DALI_MspInit(DALI_TypeDef *Instance)
153 {
154 /* Prevent unused argument(s) compilation warning */
155 LL_UNUSED(Instance);
156
157 /* NOTE: This function should not be modified, when the callback is needed,
158 the LL_DALI_MspInit could be implemented in the user file
159 */
160 }
161
162 /**
163 * @brief DeInitializes the DALI MSP
164 * @param Instance DALI peripheral
165 * @return None
166 */
LL_DALI_MspDeInit(DALI_TypeDef * Instance)167 __WEAK void LL_DALI_MspDeInit(DALI_TypeDef *Instance)
168 {
169 /* Prevent unused argument(s) compilation warning */
170 LL_UNUSED(Instance);
171
172 /* NOTE: This function should not be modified, when the callback is needed,
173 the LL_DALI_MspDeInit could be implemented in the user file
174 */
175 }
176
177 /**
178 * @}
179 */
180
181
182 /** @defgroup DALI_LL_Exported_Functions_Group2 DALI Peripheral State functions
183 * @brief DALI Peripheral State functions
184 @verbatim
185 ===============================================================================
186 ##### Peripheral State functions #####
187 ===============================================================================
188 [..]
189 This section provides functions allowing to:
190 (+) Peripheral State functions
191 @endverbatim
192 * @{
193 */
194
195 /**
196 * @brief Wait for a DALI operation to complete.
197 * @param Timeout Maximum DALI operation timeout
198 * @return LL Status
199 */
LL_DALI_WaitForLastOperation(DALI_TypeDef * Instance,uint32_t Timeout)200 LL_StatusETypeDef LL_DALI_WaitForLastOperation(DALI_TypeDef *Instance, uint32_t Timeout)
201 {
202 uint32_t tickstart = LL_GetTick();
203
204 /* Wait for the DALI operation to complete by polling on BUSY flag to be reset.
205 Even if the DALI operation fails, the BUSY flag will be reset and an error
206 flag will be set */
207 while (__LL_DALI_STATUS_FLAG_GET(Instance, DALI_FLAG_BSY) != RESET) {
208 if (Timeout != LL_WAIT_FOREVER) {
209 if ((Timeout == 0U) || ((LL_GetTick() - tickstart) > Timeout)) {
210 return LL_TIMEOUT;
211 }
212 }
213 }
214
215 /* Check if any errors occurred */
216 if ((__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_FEIF) != RESET) ||
217 (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_BEIF) != RESET)) {
218 return LL_ERROR;
219 }
220
221 /* Return function status */
222 return LL_OK;
223 }
224
225 /**
226 * @}
227 */
228
229
230 /** @defgroup DALI_LL_Exported_Functions_Group3 DALI IO operation functions
231 * @brief DALI IO operation functions
232 *
233 @verbatim
234 ==============================================================================
235 ##### IO operation functions #####
236 ==============================================================================
237 [..] This section provides functions allowing to:
238 (+) DALI Master Transmit forward frame (with or without interruption).
239 (+) DALI Master Receive backward frame (with or without interruption).
240 (+) DALI Slave Transmit backward frame (with or without interruption).
241 (+) DALI Slave Receive forward frame (with or without interruption).
242 @endverbatim
243 * @{
244 */
245
246 /**
247 * @brief DALI Master transmit forward data
248 * @note This function can only be used when DALI working in MASTER mode
249 * @param Instance DALI peripheral
250 * @param ForwardData forward frame data
251 * @return LL Status
252 */
LL_DALI_Master_Transmit(DALI_TypeDef * Instance,uint32_t ForwardData)253 LL_StatusETypeDef LL_DALI_Master_Transmit(DALI_TypeDef *Instance, uint32_t ForwardData)
254 {
255 LL_StatusETypeDef status;
256
257 /* Check the parameters */
258 assert_param(IS_DALI_ALL_INSTANCE(Instance));
259
260 /* Wait until last operation complete */
261 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
262 /* Write Data to Forward Data Register */
263 WRITE_REG(Instance->FDR, ForwardData & 0xFFFFFFUL);
264
265 /* Start transmission */
266 SET_BIT(Instance->CR, DALI_CR_TS);
267
268 /* Wait until operation complete */
269 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
270 if (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_FDIF) != SET) {
271 status = LL_FAILED;
272 }
273
274 /* Clear forward done flag */
275 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_FDIF);
276 }
277 }
278
279 /* Return function status */
280 return status;
281 }
282
283 /**
284 * @brief DALI Master transmit forward data with interrupt
285 * @note This function can only be used when DALI working in MASTER mode
286 * @param Instance DALI peripheral
287 * @param ForwardData forward frame data
288 * @return LL Status
289 */
LL_DALI_Master_Transmit_IT(DALI_TypeDef * Instance,uint32_t ForwardData)290 LL_StatusETypeDef LL_DALI_Master_Transmit_IT(DALI_TypeDef *Instance, uint32_t ForwardData)
291 {
292 LL_StatusETypeDef status;
293
294 /* Check the parameters */
295 assert_param(IS_DALI_ALL_INSTANCE(Instance));
296
297 /* Wait until last operation complete */
298 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
299 /* Write Data to Forward Data Register */
300 WRITE_REG(Instance->FDR, ForwardData & 0xFFFFFFUL);
301
302 /* Enable FDIE interrupts */
303 __LL_DALI_IT_ENABLE(Instance, DALI_IT_FDIE);
304
305 /* Start transmission */
306 SET_BIT(Instance->CR, DALI_CR_TS);
307 }
308
309 /* Return function status */
310 return status;
311 }
312
313 /**
314 * @brief DALI Master receive backward data
315 * @note This function can only be used when DALI working in MASTER mode
316 * @param Instance DALI peripheral
317 * @param BackwardData Specifies the data pointer to read in.
318 * @return LL status
319 */
LL_DALI_Master_Receive(DALI_TypeDef * Instance,uint8_t * BackwardData)320 LL_StatusETypeDef LL_DALI_Master_Receive(DALI_TypeDef *Instance, uint8_t *BackwardData)
321 {
322 LL_StatusETypeDef status;
323
324 /* Check the parameters */
325 assert_param(IS_DALI_ALL_INSTANCE(Instance));
326 assert_param(BackwardData != NULL);
327
328 /* Wait until last operation complete */
329 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
330
331 /* Check and clear BDIF flag */
332 if (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_BDIF) != RESET) {
333 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_BDIF);
334
335 *BackwardData = READ_REG(Instance->BDR) & 0xFFUL;
336 } else {
337 status = LL_FAILED;
338 }
339 }
340
341 /* Return function status */
342 return status;
343 }
344
345 /**
346 * @brief DALI Master receive backward data with interrupt
347 * @note This function can only be used when DALI working in MASTER mode
348 * @param Instance DALI peripheral
349 * @note Use __LL_DALI_MSTR_READ_BACKWARD_DATA() to get the backword data in IRQ callbacks
350 * @return LL status
351 */
LL_DALI_Master_Receive_IT(DALI_TypeDef * Instance)352 LL_StatusETypeDef LL_DALI_Master_Receive_IT(DALI_TypeDef *Instance)
353 {
354 LL_StatusETypeDef status;
355
356 /* Check the parameters */
357 assert_param(IS_DALI_ALL_INSTANCE(Instance));
358
359 /* Wait until last operation complete */
360 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
361 /* Enable BDIE interrupts */
362 __LL_DALI_IT_ENABLE(Instance, DALI_IT_BDIE);
363 }
364
365 /* Return function status */
366 return status;
367 }
368
369 /**
370 * @brief DALI Slave transmit backward data
371 * @note This function can only be used when DALI working in SLAVE mode
372 * @param Instance DALI peripheral
373 * @param BackwardData backward frame data
374 * @return LL status
375 */
LL_DALI_Slave_Transmit(DALI_TypeDef * Instance,uint8_t BackwardData)376 LL_StatusETypeDef LL_DALI_Slave_Transmit(DALI_TypeDef *Instance, uint8_t BackwardData)
377 {
378 LL_StatusETypeDef status;
379
380 /* Check the parameters */
381 assert_param(IS_DALI_ALL_INSTANCE(Instance));
382
383 /* Wait until last operation complete */
384 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
385 /* Write Data to Forward Data Register */
386 WRITE_REG(Instance->BDR, BackwardData);
387
388 /* Start transmission */
389 SET_BIT(Instance->CR, DALI_CR_TS);
390
391 /* Wait until operation complete */
392 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
393 if (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_BDIF) != SET) {
394 status = LL_FAILED;
395 }
396
397 /* Clear forward done flag */
398 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_BDIF);
399 }
400 }
401
402 /* Return function status */
403 return status;
404 }
405
406 /**
407 * @brief DALI Slave transmit backward data with interrupt
408 * @note This function can only be used when DALI working in SLAVE mode
409 * @param Instance DALI peripheral
410 * @param BackwardData backward frame data
411 * @return LL status
412 */
LL_DALI_Slave_Transmit_IT(DALI_TypeDef * Instance,uint8_t BackwardData)413 LL_StatusETypeDef LL_DALI_Slave_Transmit_IT(DALI_TypeDef *Instance, uint8_t BackwardData)
414 {
415 LL_StatusETypeDef status;
416
417 /* Check the parameters */
418 assert_param(IS_DALI_ALL_INSTANCE(Instance));
419
420 /* Wait until last operation complete */
421 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
422 /* Write Data to Forward Data Register */
423 WRITE_REG(Instance->BDR, BackwardData);
424
425 /* Enable BDIE interrupts */
426 __LL_DALI_IT_ENABLE(Instance, DALI_IT_BDIE);
427
428 /* Start transmission */
429 SET_BIT(Instance->CR, DALI_CR_TS);
430
431 }
432
433 /* Return function status */
434 return status;
435 }
436
437 /**
438 * @brief DALI Slave receive forward data
439 * @note This function can only be used when DALI working in SLAVE mode
440 * @param Instance DALI peripheral
441 * @param ForwardData Specifies the data pointer to read in.
442 * @return LL status
443 */
LL_DALI_Slave_Receive(DALI_TypeDef * Instance,uint32_t * ForwardData)444 LL_StatusETypeDef LL_DALI_Slave_Receive(DALI_TypeDef *Instance, uint32_t *ForwardData)
445 {
446 LL_StatusETypeDef status;
447
448 /* Check the parameters */
449 assert_param(IS_DALI_ALL_INSTANCE(Instance));
450 assert_param(ForwardData != NULL);
451
452 /* Wait until last operation complete */
453 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
454
455 /* Check and clear FDIF flag */
456 if (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_FDIF) != RESET) {
457 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_FDIF);
458
459 *ForwardData = READ_REG(Instance->FDR) & 0xFFFFFFUL;
460 } else {
461 status = LL_FAILED;
462 }
463 }
464
465 /* Return function status */
466 return status;
467 }
468
469 /**
470 * @brief DALI Slave receive forward data with interrupt
471 * @note This function can only be used when DALI working in SLAVE mode
472 * @param Instance DALI peripheral
473 * @note Use __LL_DALI_SLV_READ_FORWARD_DATA() to get the forward data in IRQ callbacks
474 * @return LL status
475 */
LL_DALI_Slave_Receive_IT(DALI_TypeDef * Instance)476 LL_StatusETypeDef LL_DALI_Slave_Receive_IT(DALI_TypeDef *Instance)
477 {
478 LL_StatusETypeDef status;
479
480 /* Check the parameters */
481 assert_param(IS_DALI_ALL_INSTANCE(Instance));
482
483 /* Wait until last operation complete */
484 if ((status = LL_DALI_WaitForLastOperation(Instance, DALI_TIMEOUT_MAX_VALUE)) == LL_OK) {
485 /* Enable FDIE interrupts */
486 __LL_DALI_IT_ENABLE(Instance, DALI_IT_FDIE);
487 }
488
489 /* Return function status */
490 return status;
491 }
492
493 /**
494 * @}
495 */
496
497
498 /** @defgroup DALI_LL_Exported_Functions_Interrupt DALI Initerrupt management
499 * @brief DALI Initerrupt management
500 @verbatim
501 ===============================================================================
502 ##### Initerrupt management #####
503 ===============================================================================
504 [..]
505 This section provides DALI interrupt handler and callback functions.
506 @endverbatim
507 * @{
508 */
509
510 /**
511 * @brief This function handles DALI interrupts requests.
512 * @param Instance DALI peripheral
513 * @return None
514 */
LL_DALI_IRQHandler(DALI_TypeDef * Instance)515 void LL_DALI_IRQHandler(DALI_TypeDef *Instance)
516 {
517 if ((__LL_DALI_IT_SOURCE_CHECK(Instance, DALI_IT_FDIE) != RESET) &&
518 (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_FDIF) != RESET)) {
519
520 /* Disable and clear interrupt */
521 __LL_DALI_IT_DISABLE(Instance, DALI_IT_FDIE);
522 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_FDIF);
523
524 if (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_FEIF) != RESET) {
525 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_FEIF);
526
527 /* Error detected */
528 if (READ_BIT(Instance->CR, DALI_CR_MODE_Msk) != DALI_MODE_SLAVE) {
529 LL_DALI_MstrTransmitErrorCallback(Instance);
530 } else {
531 LL_DALI_SlvReceiveErrorCallback(Instance);
532 }
533 } else {
534
535 /* Transmission complete */
536 if (READ_BIT(Instance->CR, DALI_CR_MODE_Msk) != DALI_MODE_SLAVE) {
537 LL_DALI_MstrTransmitDoneCallback(Instance);
538 } else {
539 LL_DALI_SlvReceiveDoneCallback(Instance);
540 }
541 }
542 }
543
544 if ((__LL_DALI_IT_SOURCE_CHECK(Instance, DALI_IT_BDIE) != RESET) &&
545 (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_BDIF) != RESET)) {
546
547 /* Disable and clear interrupt */
548 __LL_DALI_IT_DISABLE(Instance, DALI_IT_BDIE);
549 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_BDIF);
550
551 if (__LL_DALI_PENDING_FLAG_GET(Instance, DALI_FLAG_BEIF) != RESET) {
552 __LL_DALI_PENDING_FLAG_CLEAR(Instance, DALI_FLAG_BEIF);
553
554 /* Error detected */
555 if (READ_BIT(Instance->CR, DALI_CR_MODE_Msk) != DALI_MODE_SLAVE) {
556 LL_DALI_MstrRecviveErrorCallback(Instance);
557 } else {
558 LL_DALI_SlvTransmitErrorCallback(Instance);
559 }
560 } else {
561 /* Transmission complete */
562 if (READ_BIT(Instance->CR, DALI_CR_MODE_Msk) != DALI_MODE_SLAVE) {
563 LL_DALI_MstrRecviveDoneCallback(Instance);
564 } else {
565 LL_DALI_SlvTransmitDoneCallback(Instance);
566 }
567 }
568 }
569 }
570
571 /**
572 * @brief DALI Master receive backward frame done callback
573 * Use __LL_DALI_MSTR_READ_BACKWARD_DATA() to get the backword data
574 * @param Instance DALI peripheral
575 * @return None
576 */
LL_DALI_MstrRecviveDoneCallback(DALI_TypeDef * Instance)577 __WEAK void LL_DALI_MstrRecviveDoneCallback(DALI_TypeDef *Instance)
578 {
579 /* Prevent unused argument(s) compilation warning */
580 LL_UNUSED(Instance);
581
582 /* NOTE: This function should not be modified, when the callback is needed,
583 the LL_DALI_MstrRecviveDoneCallback could be implemented in the user file
584 */
585 }
586
587 /**
588 * @brief DALI Master receive backward frame failed callback
589 * @param Instance DALI peripheral
590 * @return None
591 */
LL_DALI_MstrRecviveErrorCallback(DALI_TypeDef * Instance)592 __WEAK void LL_DALI_MstrRecviveErrorCallback(DALI_TypeDef *Instance)
593 {
594 /* Prevent unused argument(s) compilation warning */
595 LL_UNUSED(Instance);
596
597 /* NOTE: This function should not be modified, when the callback is needed,
598 the LL_DALI_MstrRecviveErrorCallback could be implemented in the user file
599 */
600 }
601
602 /**
603 * @brief DALI Master transmit forward frame done callback
604 * @param Instance DALI peripheral
605 * @return None
606 */
LL_DALI_MstrTransmitDoneCallback(DALI_TypeDef * Instance)607 __WEAK void LL_DALI_MstrTransmitDoneCallback(DALI_TypeDef *Instance)
608 {
609 /* Prevent unused argument(s) compilation warning */
610 LL_UNUSED(Instance);
611
612 /* NOTE: This function should not be modified, when the callback is needed,
613 the LL_DALI_MstrTransmitDoneCallback could be implemented in the user file
614 */
615 }
616
617 /**
618 * @brief DALI Master transmit forward frame failed callback
619 * @param Instance DALI peripheral
620 * @return None
621 */
LL_DALI_MstrTransmitErrorCallback(DALI_TypeDef * Instance)622 __WEAK void LL_DALI_MstrTransmitErrorCallback(DALI_TypeDef *Instance)
623 {
624 /* Prevent unused argument(s) compilation warning */
625 LL_UNUSED(Instance);
626
627 /* NOTE: This function should not be modified, when the callback is needed,
628 the LL_DALI_MstrTransmitErrorCallback could be implemented in the user file
629 */
630 }
631
632 /**
633 * @brief DALI Slave receive forward frame done callback
634 * Use __LL_DALI_SLV_READ_FORWARD_DATA() to get the forward data
635 * @param Instance DALI peripheral
636 * @return None
637 */
LL_DALI_SlvReceiveDoneCallback(DALI_TypeDef * Instance)638 __WEAK void LL_DALI_SlvReceiveDoneCallback(DALI_TypeDef *Instance)
639 {
640 /* Prevent unused argument(s) compilation warning */
641 LL_UNUSED(Instance);
642
643 /* NOTE: This function should not be modified, when the callback is needed,
644 the LL_DALI_SlvReceiveDoneCallback could be implemented in the user file
645 */
646 }
647
648 /**
649 * @brief DALI Slave receive forward frame failed callback
650 * @param Instance DALI peripheral
651 * @return None
652 */
LL_DALI_SlvReceiveErrorCallback(DALI_TypeDef * Instance)653 __WEAK void LL_DALI_SlvReceiveErrorCallback(DALI_TypeDef *Instance)
654 {
655 /* Prevent unused argument(s) compilation warning */
656 LL_UNUSED(Instance);
657
658 /* NOTE: This function should not be modified, when the callback is needed,
659 the LL_DALI_SlvReceiveErrorCallback could be implemented in the user file
660 */
661 }
662
663 /**
664 * @brief DALI Slave transmit backward frame done callback
665 * @param Instance DALI peripheral
666 * @return None
667 */
LL_DALI_SlvTransmitDoneCallback(DALI_TypeDef * Instance)668 __WEAK void LL_DALI_SlvTransmitDoneCallback(DALI_TypeDef *Instance)
669 {
670 /* Prevent unused argument(s) compilation warning */
671 LL_UNUSED(Instance);
672
673 /* NOTE: This function should not be modified, when the callback is needed,
674 the LL_DALI_SlvTransmitDoneCallback could be implemented in the user file
675 */
676 }
677
678 /**
679 * @brief DALI Slave transmit backward frame failed callback
680 * @param Instance DALI peripheral
681 * @return None
682 */
LL_DALI_SlvTransmitErrorCallback(DALI_TypeDef * Instance)683 __WEAK void LL_DALI_SlvTransmitErrorCallback(DALI_TypeDef *Instance)
684 {
685 /* Prevent unused argument(s) compilation warning */
686 LL_UNUSED(Instance);
687
688 /* NOTE: This function should not be modified, when the callback is needed,
689 the LL_DALI_SlvTransmitErrorCallback could be implemented in the user file
690 */
691 }
692
693 /**
694 * @}
695 */
696
697 /**
698 * @}
699 */
700
701
702 /* Private functions ---------------------------------------------------------*/
703
704
705 #endif /* LL_DALI_MODULE_ENABLED */
706
707 /**
708 * @}
709 */
710
711 /**
712 * @}
713 */
714
715
716 /************************* (C) COPYRIGHT Tai-Action *****END OF FILE***********/
717
718