1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
118
119
123
124
125
126
127
135
136
137
145
146
147
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
181
182
183
184
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
274
275
276
277
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
360
364
365
366
367
368
369
370
371
372
373
374
375
376
380
381
382
387
395
396
401
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
434
435
436
437
438
439
440
441
445
449
453
457
463
464
465
485
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
526
530
534
538
544
545
546
566
573
574
575
576
577
578
579
580
587
588
589
590
591
597
598
599
600
604
611
612
613
614
615
616
617
623
624
625
626
627
628
629
630
634
641
642
643
644
645
646
647
648
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
702
703
704
708
709
710
711
712
713
714
715
716
717
718
719
721
722
723
725
729
730
731
732
733
734
735
736
737
738
739
740
741
742
746
747
748
753
757
758
765
769
770
775
776
777
778
779
780
781
782
783
784
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
872
877
881
882
883
884
886
887
888
892
893
894
899
907
908
914
923
924
929
937
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
961
962
963
964
965
966
967
968
969
970
971
977
981
982
985
986
989
990
991
994
995
/* ... */
#include "stm32f4xx_hal.h"
/* ... */
/* ... */
#ifdef HAL_CEC_MODULE_ENABLED
#if defined (CEC)
/* ... */
/* ... */
Private define
/* ... */
/* ... */
Private function prototypes
/* ... */
/* ... */
/* ... */
HAL_StatusTypeDef HAL_CEC_Init(CEC_HandleTypeDef *hcec)
{
if ((hcec == NULL) || (hcec->Init.RxBuffer == NULL))
{
return HAL_ERROR;
}if ((hcec == NULL) || (hcec->Init.RxBuffer == NULL)) { ... }
assert_param(IS_CEC_ALL_INSTANCE(hcec->Instance));
assert_param(IS_CEC_SIGNALFREETIME(hcec->Init.SignalFreeTime));
assert_param(IS_CEC_TOLERANCE(hcec->Init.Tolerance));
assert_param(IS_CEC_BRERXSTOP(hcec->Init.BRERxStop));
assert_param(IS_CEC_BREERRORBITGEN(hcec->Init.BREErrorBitGen));
assert_param(IS_CEC_LBPEERRORBITGEN(hcec->Init.LBPEErrorBitGen));
assert_param(IS_CEC_BROADCASTERROR_NO_ERRORBIT_GENERATION(hcec->Init.BroadcastMsgNoErrorBitGen));
assert_param(IS_CEC_SFTOP(hcec->Init.SignalFreeTimeOption));
assert_param(IS_CEC_LISTENING_MODE(hcec->Init.ListenMode));
assert_param(IS_CEC_OWN_ADDRESS(hcec->Init.OwnAddress));
#if (USE_HAL_CEC_REGISTER_CALLBACKS == 1)
if (hcec->gState == HAL_CEC_STATE_RESET)
{
hcec->Lock = HAL_UNLOCKED;
hcec->TxCpltCallback = HAL_CEC_TxCpltCallback;
hcec->RxCpltCallback = HAL_CEC_RxCpltCallback;
hcec->ErrorCallback = HAL_CEC_ErrorCallback;
if (hcec->MspInitCallback == NULL)
{
hcec->MspInitCallback = HAL_CEC_MspInit;
}if (hcec->MspInitCallback == NULL) { ... }
hcec->MspInitCallback(hcec);
}if (hcec->gState == HAL_CEC_STATE_RESET) { ... }
/* ... */#else
if (hcec->gState == HAL_CEC_STATE_RESET)
{
hcec->Lock = HAL_UNLOCKED;
HAL_CEC_MspInit(hcec);
}if (hcec->gState == HAL_CEC_STATE_RESET) { ... }
/* ... */#endif
hcec->gState = HAL_CEC_STATE_BUSY;
__HAL_CEC_DISABLE(hcec);
hcec->Instance->CFGR = hcec->Init.SignalFreeTime | hcec->Init.Tolerance | hcec->Init.BRERxStop | \
hcec->Init.BREErrorBitGen | hcec->Init.LBPEErrorBitGen | \
hcec->Init.BroadcastMsgNoErrorBitGen | \
hcec->Init.SignalFreeTimeOption | ((uint32_t)(hcec->Init.OwnAddress) << 16U) | \
hcec->Init.ListenMode;
/* ... */
__HAL_CEC_ENABLE_IT(hcec, CEC_IT_RXBR | CEC_IT_RXEND | CEC_IER_RX_ALL_ERR | CEC_IT_TXBR | CEC_IT_TXEND |
CEC_IER_TX_ALL_ERR);
__HAL_CEC_ENABLE(hcec);
hcec->ErrorCode = HAL_CEC_ERROR_NONE;
hcec->gState = HAL_CEC_STATE_READY;
hcec->RxState = HAL_CEC_STATE_READY;
return HAL_OK;
}{ ... }
/* ... */
HAL_StatusTypeDef HAL_CEC_DeInit(CEC_HandleTypeDef *hcec)
{
if (hcec == NULL)
{
return HAL_ERROR;
}if (hcec == NULL) { ... }
assert_param(IS_CEC_ALL_INSTANCE(hcec->Instance));
hcec->gState = HAL_CEC_STATE_BUSY;
#if (USE_HAL_CEC_REGISTER_CALLBACKS == 1)
if (hcec->MspDeInitCallback == NULL)
{
hcec->MspDeInitCallback = HAL_CEC_MspDeInit;
}if (hcec->MspDeInitCallback == NULL) { ... }
hcec->MspDeInitCallback(hcec);
/* ... */
#else
HAL_CEC_MspDeInit(hcec);/* ... */
#endif
__HAL_CEC_DISABLE(hcec);
__HAL_CEC_CLEAR_FLAG(hcec, CEC_FLAG_TXEND | CEC_FLAG_TXBR | CEC_FLAG_RXBR | CEC_FLAG_RXEND | CEC_ISR_ALL_ERROR);
/* ... */
__HAL_CEC_DISABLE_IT(hcec, CEC_IT_RXBR | CEC_IT_RXEND | CEC_IER_RX_ALL_ERR | CEC_IT_TXBR | CEC_IT_TXEND |
CEC_IER_TX_ALL_ERR);
hcec->ErrorCode = HAL_CEC_ERROR_NONE;
hcec->gState = HAL_CEC_STATE_RESET;
hcec->RxState = HAL_CEC_STATE_RESET;
__HAL_UNLOCK(hcec);
return HAL_OK;
}{ ... }
/* ... */
HAL_StatusTypeDef HAL_CEC_SetDeviceAddress(CEC_HandleTypeDef *hcec, uint16_t CEC_OwnAddress)
{
assert_param(IS_CEC_OWN_ADDRESS(CEC_OwnAddress));
if ((hcec->gState == HAL_CEC_STATE_READY) && (hcec->RxState == HAL_CEC_STATE_READY))
{
__HAL_LOCK(hcec);
hcec->gState = HAL_CEC_STATE_BUSY;
__HAL_CEC_DISABLE(hcec);
if (CEC_OwnAddress != CEC_OWN_ADDRESS_NONE)
{
hcec->Instance->CFGR |= ((uint32_t)CEC_OwnAddress << 16);
}if (CEC_OwnAddress != CEC_OWN_ADDRESS_NONE) { ... }
else
{
hcec->Instance->CFGR &= ~(CEC_CFGR_OAR);
}else { ... }
hcec->gState = HAL_CEC_STATE_READY;
hcec->ErrorCode = HAL_CEC_ERROR_NONE;
__HAL_UNLOCK(hcec);
__HAL_CEC_ENABLE(hcec);
return HAL_OK;
}if ((hcec->gState == HAL_CEC_STATE_READY) && (hcec->RxState == HAL_CEC_STATE_READY)) { ... }
else
{
return HAL_BUSY;
}else { ... }
}{ ... }
/* ... */
__weak void HAL_CEC_MspInit(CEC_HandleTypeDef *hcec)
{
UNUSED(hcec);
/* ... */
}{ ... }
/* ... */
__weak void HAL_CEC_MspDeInit(CEC_HandleTypeDef *hcec)
{
UNUSED(hcec);
/* ... */
}{ ... }
#if (USE_HAL_CEC_REGISTER_CALLBACKS == 1)
/* ... */
HAL_StatusTypeDef HAL_CEC_RegisterCallback(CEC_HandleTypeDef *hcec, HAL_CEC_CallbackIDTypeDef CallbackID,
pCEC_CallbackTypeDef pCallback)
{
HAL_StatusTypeDef status = HAL_OK;
if (pCallback == NULL)
{
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
return HAL_ERROR;
}if (pCallback == NULL) { ... }
__HAL_LOCK(hcec);
if (hcec->gState == HAL_CEC_STATE_READY)
{
switch (CallbackID)
{
case HAL_CEC_TX_CPLT_CB_ID :
hcec->TxCpltCallback = pCallback;
break;
case HAL_CEC_TX_CPLT_CB_ID :
case HAL_CEC_ERROR_CB_ID :
hcec->ErrorCallback = pCallback;
break;
case HAL_CEC_ERROR_CB_ID :
case HAL_CEC_MSPINIT_CB_ID :
hcec->MspInitCallback = pCallback;
break;
case HAL_CEC_MSPINIT_CB_ID :
case HAL_CEC_MSPDEINIT_CB_ID :
hcec->MspDeInitCallback = pCallback;
break;
case HAL_CEC_MSPDEINIT_CB_ID :
default :
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
break;default
}switch (CallbackID) { ... }
}if (hcec->gState == HAL_CEC_STATE_READY) { ... }
else if (hcec->gState == HAL_CEC_STATE_RESET)
{
switch (CallbackID)
{
case HAL_CEC_MSPINIT_CB_ID :
hcec->MspInitCallback = pCallback;
break;
case HAL_CEC_MSPINIT_CB_ID :
case HAL_CEC_MSPDEINIT_CB_ID :
hcec->MspDeInitCallback = pCallback;
break;
case HAL_CEC_MSPDEINIT_CB_ID :
default :
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
break;default
}switch (CallbackID) { ... }
}else if (hcec->gState == HAL_CEC_STATE_RESET) { ... }
else
{
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
}else { ... }
__HAL_UNLOCK(hcec);
return status;
}HAL_CEC_RegisterCallback (CEC_HandleTypeDef *hcec, HAL_CEC_CallbackIDTypeDef CallbackID, pCEC_CallbackTypeDef pCallback) { ... }
/* ... */
HAL_StatusTypeDef HAL_CEC_UnRegisterCallback(CEC_HandleTypeDef *hcec, HAL_CEC_CallbackIDTypeDef CallbackID)
{
HAL_StatusTypeDef status = HAL_OK;
__HAL_LOCK(hcec);
if (hcec->gState == HAL_CEC_STATE_READY)
{
switch (CallbackID)
{
case HAL_CEC_TX_CPLT_CB_ID :
hcec->TxCpltCallback = HAL_CEC_TxCpltCallback;
break;
case HAL_CEC_TX_CPLT_CB_ID :
case HAL_CEC_ERROR_CB_ID :
hcec->ErrorCallback = HAL_CEC_ErrorCallback;
break;
case HAL_CEC_ERROR_CB_ID :
case HAL_CEC_MSPINIT_CB_ID :
hcec->MspInitCallback = HAL_CEC_MspInit;
break;
case HAL_CEC_MSPINIT_CB_ID :
case HAL_CEC_MSPDEINIT_CB_ID :
hcec->MspDeInitCallback = HAL_CEC_MspDeInit;
break;
case HAL_CEC_MSPDEINIT_CB_ID :
default :
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
break;default
}switch (CallbackID) { ... }
}if (hcec->gState == HAL_CEC_STATE_READY) { ... }
else if (hcec->gState == HAL_CEC_STATE_RESET)
{
switch (CallbackID)
{
case HAL_CEC_MSPINIT_CB_ID :
hcec->MspInitCallback = HAL_CEC_MspInit;
break;
case HAL_CEC_MSPINIT_CB_ID :
case HAL_CEC_MSPDEINIT_CB_ID :
hcec->MspDeInitCallback = HAL_CEC_MspDeInit;
break;
case HAL_CEC_MSPDEINIT_CB_ID :
default :
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
break;default
}switch (CallbackID) { ... }
}else if (hcec->gState == HAL_CEC_STATE_RESET) { ... }
else
{
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
}else { ... }
__HAL_UNLOCK(hcec);
return status;
}HAL_CEC_UnRegisterCallback (CEC_HandleTypeDef *hcec, HAL_CEC_CallbackIDTypeDef CallbackID) { ... }
/* ... */
HAL_StatusTypeDef HAL_CEC_RegisterRxCpltCallback(CEC_HandleTypeDef *hcec, pCEC_RxCallbackTypeDef pCallback)
{
HAL_StatusTypeDef status = HAL_OK;
if (pCallback == NULL)
{
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
return HAL_ERROR;
}if (pCallback == NULL) { ... }
__HAL_LOCK(hcec);
if (HAL_CEC_STATE_READY == hcec->RxState)
{
hcec->RxCpltCallback = pCallback;
}if (HAL_CEC_STATE_READY == hcec->RxState) { ... }
else
{
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
}else { ... }
__HAL_UNLOCK(hcec);
return status;
}HAL_CEC_RegisterRxCpltCallback (CEC_HandleTypeDef *hcec, pCEC_RxCallbackTypeDef pCallback) { ... }
/* ... */
HAL_StatusTypeDef HAL_CEC_UnRegisterRxCpltCallback(CEC_HandleTypeDef *hcec)
{
HAL_StatusTypeDef status = HAL_OK;
__HAL_LOCK(hcec);
if (HAL_CEC_STATE_READY == hcec->RxState)
{
hcec->RxCpltCallback = HAL_CEC_RxCpltCallback;
}if (HAL_CEC_STATE_READY == hcec->RxState) { ... }
else
{
hcec->ErrorCode |= HAL_CEC_ERROR_INVALID_CALLBACK;
status = HAL_ERROR;
}else { ... }
__HAL_UNLOCK(hcec);
return status;
}HAL_CEC_UnRegisterRxCpltCallback (CEC_HandleTypeDef *hcec) { ... }
/* ... */#endif
/* ... */
/* ... */
/* ... */
HAL_StatusTypeDef HAL_CEC_Transmit_IT(CEC_HandleTypeDef *hcec, uint8_t InitiatorAddress, uint8_t DestinationAddress,
const uint8_t *pData, uint32_t Size)
{
/* ... */
if (hcec->gState == HAL_CEC_STATE_READY)
{
if ((pData == NULL) && (Size > 0U))
{
return HAL_ERROR;
}if ((pData == NULL) && (Size > 0U)) { ... }
assert_param(IS_CEC_ADDRESS(DestinationAddress));
assert_param(IS_CEC_ADDRESS(InitiatorAddress));
assert_param(IS_CEC_MSGSIZE(Size));
__HAL_LOCK(hcec);
hcec->pTxBuffPtr = pData;
hcec->gState = HAL_CEC_STATE_BUSY_TX;
hcec->ErrorCode = HAL_CEC_ERROR_NONE;
/* ... */
hcec->TxXferCount = (uint16_t)Size;
/* ... */
if (Size == 0U)
{
__HAL_CEC_LAST_BYTE_TX_SET(hcec);
}if (Size == 0U) { ... }
hcec->Instance->TXDR = (uint32_t)(((uint32_t)InitiatorAddress << CEC_INITIATOR_LSB_POS) | DestinationAddress);
__HAL_CEC_FIRST_BYTE_TX_SET(hcec);
__HAL_UNLOCK(hcec);
return HAL_OK;
}if (hcec->gState == HAL_CEC_STATE_READY) { ... }
else
{
return HAL_BUSY;
}else { ... }
}{ ... }
/* ... */
uint32_t HAL_CEC_GetLastReceivedFrameSize(const CEC_HandleTypeDef *hcec)
{
return hcec->RxXferSize;
}{ ... }
/* ... */
void HAL_CEC_ChangeRxBuffer(CEC_HandleTypeDef *hcec, uint8_t *Rxbuffer)
{
hcec->Init.RxBuffer = Rxbuffer;
}{ ... }
/* ... */
void HAL_CEC_IRQHandler(CEC_HandleTypeDef *hcec)
{
uint32_t itflag;
itflag = hcec->Instance->ISR;
if (HAL_IS_BIT_SET(itflag, CEC_FLAG_ARBLST))
{
hcec->ErrorCode = HAL_CEC_ERROR_ARBLST;
__HAL_CEC_CLEAR_FLAG(hcec, CEC_FLAG_ARBLST);
}if (HAL_IS_BIT_SET(itflag, CEC_FLAG_ARBLST)) { ... }
CEC TX arbitration error interrupt occurred
if (HAL_IS_BIT_SET(itflag, CEC_FLAG_RXBR))
{
hcec->RxState = HAL_CEC_STATE_BUSY_RX;
hcec->RxXferSize++;
*hcec->Init.RxBuffer = (uint8_t) hcec->Instance->RXDR;
hcec->Init.RxBuffer++;
__HAL_CEC_CLEAR_FLAG(hcec, CEC_FLAG_RXBR);
}if (HAL_IS_BIT_SET(itflag, CEC_FLAG_RXBR)) { ... }
CEC RX byte received interrupt
if (HAL_IS_BIT_SET(itflag, CEC_FLAG_RXEND))
{
__HAL_CEC_CLEAR_FLAG(hcec, CEC_FLAG_RXEND);
hcec->RxState = HAL_CEC_STATE_READY;
hcec->ErrorCode = HAL_CEC_ERROR_NONE;
hcec->Init.RxBuffer -= hcec->RxXferSize;
#if (USE_HAL_CEC_REGISTER_CALLBACKS == 1U)
hcec->RxCpltCallback(hcec, hcec->RxXferSize);
#else
HAL_CEC_RxCpltCallback(hcec, hcec->RxXferSize);
#endif
hcec->RxXferSize = 0U;
}if (HAL_IS_BIT_SET(itflag, CEC_FLAG_RXEND)) { ... }
CEC RX end received interrupt
if (HAL_IS_BIT_SET(itflag, CEC_FLAG_TXBR))
{
--hcec->TxXferCount;
if (hcec->TxXferCount == 0U)
{
__HAL_CEC_LAST_BYTE_TX_SET(hcec);
}if (hcec->TxXferCount == 0U) { ... }
hcec->Instance->TXDR = (uint8_t) * hcec->pTxBuffPtr;
hcec->pTxBuffPtr++;
__HAL_CEC_CLEAR_FLAG(hcec, CEC_FLAG_TXBR);
}if (HAL_IS_BIT_SET(itflag, CEC_FLAG_TXBR)) { ... }
CEC TX byte request interrupt
if (HAL_IS_BIT_SET(itflag, CEC_FLAG_TXEND))
{
__HAL_CEC_CLEAR_FLAG(hcec, CEC_FLAG_TXEND);
hcec->gState = HAL_CEC_STATE_READY;
/* ... */
__HAL_UNLOCK(hcec);
hcec->ErrorCode = HAL_CEC_ERROR_NONE;
#if (USE_HAL_CEC_REGISTER_CALLBACKS == 1U)
hcec->TxCpltCallback(hcec);
#else
HAL_CEC_TxCpltCallback(hcec);
#endif
}if (HAL_IS_BIT_SET(itflag, CEC_FLAG_TXEND)) { ... }
CEC TX end interrupt
if ((itflag & (CEC_ISR_RXOVR | CEC_ISR_BRE | CEC_ISR_SBPE | CEC_ISR_LBPE | CEC_ISR_RXACKE | CEC_ISR_TXUDR |
CEC_ISR_TXERR | CEC_ISR_TXACKE)) != 0U)
{
hcec->ErrorCode = itflag;
__HAL_CEC_CLEAR_FLAG(hcec, HAL_CEC_ERROR_RXOVR | HAL_CEC_ERROR_BRE | CEC_FLAG_LBPE | CEC_FLAG_SBPE |
HAL_CEC_ERROR_RXACKE | HAL_CEC_ERROR_TXUDR | HAL_CEC_ERROR_TXERR | HAL_CEC_ERROR_TXACKE);
if ((itflag & (CEC_ISR_RXOVR | CEC_ISR_BRE | CEC_ISR_SBPE | CEC_ISR_LBPE | CEC_ISR_RXACKE)) != 0U)
{
hcec->Init.RxBuffer -= hcec->RxXferSize;
hcec->RxXferSize = 0U;
hcec->RxState = HAL_CEC_STATE_READY;
}if ((itflag & (CEC_ISR_RXOVR | CEC_ISR_BRE | CEC_ISR_SBPE | CEC_ISR_LBPE | CEC_ISR_RXACKE)) != 0U) { ... }
else if (((itflag & CEC_ISR_ARBLST) == 0U) && ((itflag & (CEC_ISR_TXUDR | CEC_ISR_TXERR | CEC_ISR_TXACKE)) != 0U))
{
hcec->gState = HAL_CEC_STATE_READY;
}else if (((itflag & CEC_ISR_ARBLST) == 0U) && ((itflag & (CEC_ISR_TXUDR | CEC_ISR_TXERR | CEC_ISR_TXACKE)) != 0U)) { ... }
else
{
}else { ... }
#if (USE_HAL_CEC_REGISTER_CALLBACKS == 1U)
hcec->ErrorCallback(hcec);
#else
HAL_CEC_ErrorCallback(hcec);/* ... */
#endif
}if ((itflag & (CEC_ISR_RXOVR | CEC_ISR_BRE | CEC_ISR_SBPE | CEC_ISR_LBPE | CEC_ISR_RXACKE | CEC_ISR_TXUDR | CEC_ISR_TXERR | CEC_ISR_TXACKE)) != 0U) { ... }
else
{
}else { ... }
}{ ... }
/* ... */
__weak void HAL_CEC_TxCpltCallback(CEC_HandleTypeDef *hcec)
{
UNUSED(hcec);
/* ... */
}{ ... }
/* ... */
__weak void HAL_CEC_RxCpltCallback(CEC_HandleTypeDef *hcec, uint32_t RxFrameSize)
{
UNUSED(hcec);
UNUSED(RxFrameSize);
/* ... */
}{ ... }
/* ... */
__weak void HAL_CEC_ErrorCallback(CEC_HandleTypeDef *hcec)
{
UNUSED(hcec);
/* ... */
}{ ... }
/* ... */
/* ... */
/* ... */
HAL_CEC_StateTypeDef HAL_CEC_GetState(const CEC_HandleTypeDef *hcec)
{
uint32_t temp1;
uint32_t temp2;
temp1 = hcec->gState;
temp2 = hcec->RxState;
return (HAL_CEC_StateTypeDef)(temp1 | temp2);
}{ ... }
/* ... */
uint32_t HAL_CEC_GetError(const CEC_HandleTypeDef *hcec)
{
return hcec->ErrorCode;
}{ ... }
/* ... */
/* ... */
/* ... */#endif /* ... */
#endif
/* ... */
/* ... */