foxBMS  1.6.0
The foxBMS Battery Management System API Documentation
can_cbs_rx_debug.c
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2023, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file can_cbs_rx_debug.c
44  * @author foxBMS Team
45  * @date 2021-04-20 (date of creation)
46  * @updated 2023-10-12 (date of last update)
47  * @version v1.6.0
48  * @ingroup DRIVER
49  * @prefix CANRX
50  *
51  * @brief CAN driver Rx callback implementation
52  * @details CAN Rx callback for the debug message
53  */
54 
55 /*========== Includes =======================================================*/
56 #include "can_cbs_rx.h"
60 #include "can_helper.h"
61 #include "fram.h"
62 #include "ftask.h"
63 #include "reset.h"
64 #include "rtc.h"
65 
66 #include <stdbool.h>
67 #include <stdint.h>
68 
69 /*========== Macros and Definitions =========================================*/
70 
71 #define CANRX_BIT (1u)
72 
73 /** @{
74  * multiplexer setup for the debug message
75  */
76 #define CANRX_DEBUG_MESSAGE_MUX_START_BIT (0x7u)
77 #define CANRX_DEBUG_MESSAGE_MUX_LENGTH (8u)
78 /** @} */
79 
80 /** @{
81  * supported multiplexer values
82  */
83 #define CANRX_DEBUG_MESSAGE_MUX_VALUE_VERSION_INFORMATION (0x00u)
84 #define CANRX_DEBUG_MESSAGE_MUX_VALUE_RTC (0x01u)
85 #define CANRX_DEBUG_MESSAGE_MUX_VALUE_SOFTWARE_RESET (0x02u)
86 #define CANRX_DEBUG_MESSAGE_MUX_VALUE_FRAM_INITIALIZATION (0x03u)
87 #define CANRX_DEBUG_MESSAGE_MUX_VALUE_TIME_INFO (0x04u)
88 /** @} */
89 
90 /** @{
91  * configuration of the version information signals for multiplexer
92  * 'VersionInformation' in the 'Debug message
93  */
94 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_BMS_SOFTWARE_VERSION_START_BIT (8u)
95 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_BMS_SOFTWARE_VERSION_LENGTH (CANRX_BIT)
96 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_UNIQUE_DIE_ID_START_BIT (9u)
97 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_UNIQUE_DIE_ID_LENGTH (CANRX_BIT)
98 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_LOT_NUMBER_START_BIT (10u)
99 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_LOT_NUMBER_LENGTH (CANRX_BIT)
100 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_WAFER_INFORMATION_START_BIT (11u)
101 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_WAFER_INFORMATION_LENGTH (CANRX_BIT)
102 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_COMMIT_HASH_START_BIT (12u)
103 #define CANRX_MUX_VERSION_INFO_SIGNAL_GET_COMMIT_HASH_LENGTH (CANRX_BIT)
104 /** @} */
105 
106 /** @{
107  * configuration of the RTC signals for multiplexer 'RTC' in the 'Debug'
108  * message
109  */
110 #define CANRX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_START_BIT (15u)
111 #define CANRX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_LENGTH (7u)
112 #define CANRX_MUX_RTC_SIGNAL_SECONDS_START_BIT (8u)
113 #define CANRX_MUX_RTC_SIGNAL_SECONDS_LENGTH (6u)
114 #define CANRX_MUX_RTC_SIGNAL_MINUTES_START_BIT (18u)
115 #define CANRX_MUX_RTC_SIGNAL_MINUTES_LENGTH (6u)
116 #define CANRX_MUX_RTC_SIGNAL_HOURS_START_BIT (28u)
117 #define CANRX_MUX_RTC_SIGNAL_HOURS_LENGTH (5u)
118 #define CANRX_MUX_RTC_SIGNAL_WEEKDAY_START_BIT (39u)
119 #define CANRX_MUX_RTC_SIGNAL_WEEKDAY_LENGTH (3u)
120 #define CANRX_MUX_RTC_SIGNAL_DAY_START_BIT (36u)
121 #define CANRX_MUX_RTC_SIGNAL_DAY_LENGTH (5u)
122 #define CANRX_MUX_RTC_SIGNAL_MONTH_START_BIT (47u)
123 #define CANRX_MUX_RTC_SIGNAL_MONTH_LENGTH (4u)
124 #define CANRX_MUX_RTC_SIGNAL_YEAR_START_BIT (43u)
125 #define CANRX_MUX_RTC_SIGNAL_YEAR_LENGTH (7u)
126 /** @} */
127 
128 /** @{
129  * configuration of the software reset signals for multiplexer 'SoftwareReset'
130  * in the 'Debug' message
131  */
132 #define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_SOFTWARE_RESET_START_BIT (39u)
133 #define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_SOFTWARE_RESET_LENGTH (CANRX_BIT)
134 /** @} */
135 
136 /** @{
137  * configuration of the FRAM initialization signals for multiplexer 'InitializeFram'
138  * in the 'Debug' message
139  */
140 #define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_FRAM_INITIALIZATION_START_BIT (27u)
141 #define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_FRAM_INITIALIZATION_LENGTH (CANRX_BIT)
142 /** @} */
143 
144 /** @{
145  * configuration of the time info signals for multiplexer 'TimeInfo'
146  * in the 'Debug' message
147  */
148 #define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_REQUEST_RTC_TIME_START_BIT (8u)
149 #define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_REQUEST_RTC_TIME_LENGTH (CANRX_BIT)
150 /** @} */
151 
152 /*========== Static Constant and Variable Definitions =======================*/
153 
154 /*========== Extern Constant and Variable Definitions =======================*/
155 
156 /*========== Static Function Prototypes =====================================*/
157 
158 /**
159  * @brief Parses CAN message to handle version related messages
160  * @param messageData message data of the CAN message
161  * @param endianness endianness of the message
162  */
163 static void CANRX_ProcessVersionInformationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness);
164 
165 /**
166  * @brief Parses CAN message to set the RTC clock
167  * @param messageData message data of the CAN message
168  * @param endianness endianness of the message
169  */
170 static void CANRX_ProcessRtcMux(uint64_t messageData, CAN_ENDIANNESS_e endianness);
171 
172 /**
173  * @brief Parses CAN message to handle software related requests, e.g., a
174  * software reset of the BMS
175  * @param messageData message data of the CAN message
176  * @param endianness endianness of the message
177  */
178 static void CANRX_ProcessSoftwareResetMux(uint64_t messageData, CAN_ENDIANNESS_e endianness);
179 
180 /**
181  * @brief Parses CAN message related to FRAM initialization
182  * @param messageData message data of the CAN message
183  * @param endianness endianness of the message
184  */
185 static void CANRX_ProcessFramInitializationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness);
186 
187 /**
188  * @brief Parses CAN message to handle time information requests
189  * @param messageData message data of the CAN message
190  * @param endianness endianness of the message
191  */
192 static void CANRX_ProcessTimeInfoMux(uint64_t messageData, CAN_ENDIANNESS_e endianness);
193 
194 /**
195  * @brief Parses the CAN message to retrieve the hundredth of seconds
196  * information
197  * @param messageData message data of the CAN message
198  * @param endianness endianness of the message
199  * @returns Decoded hundredth of seconds information
200  */
201 static uint8_t CANRX_GetHundredthOfSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness);
202 
203 /**
204  * @brief Parses the CAN message to retrieve the seconds information
205  * @param messageData message data of the CAN message
206  * @param endianness endianness of the message
207  * @returns Decoded seconds information
208  */
209 static uint8_t CANRX_GetSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness);
210 
211 /**
212  * @brief Parses the CAN message to retrieve the minutes information
213  * @param messageData message data of the CAN message
214  * @param endianness endianness of the message
215  * @returns Decoded minutes information
216  */
217 static uint8_t CANRX_GetMinutes(uint64_t messageData, CAN_ENDIANNESS_e endianness);
218 
219 /**
220  * @brief Parses the CAN message to retrieve the hours information
221  * @param messageData message data of the CAN message
222  * @param endianness endianness of the message
223  * @returns Decoded hours information
224  */
225 static uint8_t CANRX_GetHours(uint64_t messageData, CAN_ENDIANNESS_e endianness);
226 
227 /**
228  * @brief Parses the CAN message to retrieve the weekday information
229  * @param messageData message data of the CAN message
230  * @param endianness endianness of the message
231  * @returns Decoded weekday information
232  */
233 static uint8_t CANRX_GetWeekday(uint64_t messageData, CAN_ENDIANNESS_e endianness);
234 
235 /**
236  * @brief Parses the CAN message to retrieve the day information
237  * @param messageData message data of the CAN message
238  * @param endianness endianness of the message
239  * @returns Decoded Day information
240  */
241 static uint8_t CANRX_GetDay(uint64_t messageData, CAN_ENDIANNESS_e endianness);
242 
243 /**
244  * @brief Parses the CAN message to retrieve the month information
245  * @param messageData message data of the CAN message
246  * @param endianness endianness of the message
247 * @returns Decoded month information
248  */
249 static uint8_t CANRX_GetMonth(uint64_t messageData, CAN_ENDIANNESS_e endianness);
250 
251 /**
252  * @brief Parses the CAN message to retrieve the year information
253  * @param messageData message data of the CAN message
254  * @param endianness endianness of the message
255 * @returns Decoded year information
256  */
257 static uint8_t CANRX_GetYear(uint64_t messageData, CAN_ENDIANNESS_e endianness);
258 
259 /**
260  * @brief Check if the BMS software version information is requested
261  * @param messageData message data of the CAN message
262  * @param endianness endianness of the message
263  * @returns true if the information is requested, false otherwise
264  */
265 static bool CANRX_CheckIfBmsSoftwareVersionIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
266 
267 /**
268  * @brief Triggers sending of the BMS software version information message
269  */
271 
272 /**
273  * @brief Check if the MCU die ID information is requested
274  * @param messageData message data of the CAN message
275  * @param endianness endianness of the message
276  * @returns true if the information is requested, false otherwise
277  */
278 static bool CANRX_CheckIfMcuUniqueDieIdIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
279 
280 /**
281  * @brief Triggers sending of the MCU die ID information message
282  */
283 static void CANRX_TriggerMcuUniqueDieIdMessage(void);
284 
285 /**
286  * @brief Check if the MCU lot number information is requested
287  * @param messageData message data of the CAN message
288  * @param endianness endianness of the message
289  * @returns true if the information is requested, false otherwise
290  */
291 static bool CANRX_CheckIfMcuLotNumberIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
292 
293 /**
294  * @brief Triggers sending of the MCU lot number information message
295  */
296 static void CANRX_TriggerMcuLotNumberMessage(void);
297 
298 /**
299  * @brief Check if the MCU wafer information is requested
300  * @param messageData message data of the CAN message
301  * @param endianness endianness of the message
302  * @returns true if the information is requested, false otherwise
303  */
304 static bool CANRX_CheckIfMcuWaferInformationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
305 
306 /**
307  * @brief Triggers sending of the MCU wafer information message
308  */
310 
311 /**
312  * @brief Check if the commit hash is requested
313  * @param messageData message data of the CAN message
314  * @param endianness endianness of the message
315  * @returns true if the information is requested, false otherwise
316  */
317 static bool CANRX_CheckIfCommitHashIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
318 
319 /**
320  * @brief Triggers sending of the commit hash message
321  */
322 static void CANRX_TriggerCommitHashMessage(void);
323 
324 /**
325  * @brief Check if a software reset is requested
326  * @param messageData message data of the CAN message
327  * @param endianness endianness of the message
328  * @returns true if software reset is requested, false otherwise
329  */
330 static bool CANRX_CheckIfSoftwareResetIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
331 
332 /**
333  * @brief Check if a FRAM initialization is requested
334  * @param messageData message data of the CAN message
335  * @param endianness endianness of the message
336  * @returns true if software reset is requested, false otherwise
337  */
338 static bool CANRX_CheckIfFramInitializationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
339 
340 /**
341  * @brief Check if the RTC time information is requested
342  * @param messageData message data of the CAN message
343  * @param endianness endianness of the message
344  * @returns true if the information is requested, false otherwise
345  */
346 static bool CANRX_CheckIfTimeInfoIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness);
347 
348 /**
349  * @brief Triggers sending of the RTC time information message
350  */
351 static void CANRX_TriggerTimeInfoMessage(void);
352 
353 /*========== Static Function Implementations ================================*/
354 
355 static uint8_t CANRX_GetHundredthOfSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
356  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
357  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
358 
359  uint64_t signalData = 0u;
360  /* Get hundredth of seconds information form the message and return that value */
362  messageData,
365  &signalData,
366  endianness);
367  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
368  return (uint8_t)signalData;
369 }
370 
371 static uint8_t CANRX_GetSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
372  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
373  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
374 
375  uint64_t signalData = 0u;
376  /* Get seconds information form the message and return that value */
378  messageData,
381  &signalData,
382  endianness);
383 
384  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
385  return (uint8_t)signalData;
386 }
387 
388 static uint8_t CANRX_GetMinutes(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
389  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
390  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
391 
392  uint64_t signalData = 0u;
393  /* Get minutes information form the message and return that value */
395  messageData,
398  &signalData,
399  endianness);
400 
401  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
402  return (uint8_t)signalData;
403 }
404 
405 static uint8_t CANRX_GetHours(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
406  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
407  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
408 
409  uint64_t signalData = 0u;
410  /* Get hour information form the message and return that value */
412  messageData, CANRX_MUX_RTC_SIGNAL_HOURS_START_BIT, CANRX_MUX_RTC_SIGNAL_HOURS_LENGTH, &signalData, endianness);
413 
414  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
415  return (uint8_t)signalData;
416 }
417 
418 static uint8_t CANRX_GetWeekday(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
419  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
420  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
421 
422  uint64_t signalData = 0u;
423  /* Get weekday information form the message and return that value */
425  messageData,
428  &signalData,
429  endianness);
430 
431  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
432  return (uint8_t)signalData;
433 }
434 
435 static uint8_t CANRX_GetDay(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
436  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
437  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
438 
439  uint64_t signalData = 0u;
440  /* Get day information form the message and return that value */
442  messageData, CANRX_MUX_RTC_SIGNAL_DAY_START_BIT, CANRX_MUX_RTC_SIGNAL_DAY_LENGTH, &signalData, endianness);
443 
444  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
445  return (uint8_t)signalData;
446 }
447 
448 static uint8_t CANRX_GetMonth(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
449  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
450  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
451 
452  /* Get month information form the message and return that value */
453  uint64_t signalData = 0u;
455  messageData, CANRX_MUX_RTC_SIGNAL_MONTH_START_BIT, CANRX_MUX_RTC_SIGNAL_MONTH_LENGTH, &signalData, endianness);
456 
457  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
458  return (uint8_t)signalData;
459 }
460 
461 static uint8_t CANRX_GetYear(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
462  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
463  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
464 
465  /* Get year information form the message and return that value */
466  uint64_t signalData = 0u;
468  messageData, CANRX_MUX_RTC_SIGNAL_YEAR_START_BIT, CANRX_MUX_RTC_SIGNAL_YEAR_LENGTH, &signalData, endianness);
469 
470  /* AXIVION Next Codeline Style MisraC2012Directive-4.1: only first byte is of interest */
471  return (uint8_t)signalData;
472 }
473 
474 static void CANRX_ProcessRtcMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
475  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
476  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
477 
478  RTC_TIME_DATA_s time = {0};
479 
480  time.hundredthOfSeconds = CANRX_GetHundredthOfSeconds(messageData, endianness);
481  time.seconds = CANRX_GetSeconds(messageData, endianness);
482  time.minutes = CANRX_GetMinutes(messageData, endianness);
483  time.hours = CANRX_GetHours(messageData, endianness);
484  time.weekday = CANRX_GetWeekday(messageData, endianness);
485  time.day = CANRX_GetDay(messageData, endianness);
486  time.month = CANRX_GetMonth(messageData, endianness);
487  time.year = CANRX_GetYear(messageData, endianness);
488  if (OS_SendToBackOfQueue(ftsk_rtcSetTimeQueue, (void *)&time, 0u) == OS_SUCCESS) {
489  /* queue is not full */
490  }
491 }
492 
493 static bool CANRX_CheckIfBmsSoftwareVersionIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
494  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
495  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
496 
497  bool isRequested = false;
498  uint64_t signalData = 0u;
499 
500  /* get BMS software version information bit from the CAN message */
502  messageData,
505  &signalData,
506  endianness);
507  if (signalData == 1u) {
508  isRequested = true;
509  }
510  return isRequested;
511 }
512 
514  /* send the debug message containing the BMS software version information and trap if this does not work */
517  }
518 }
519 
520 static bool CANRX_CheckIfMcuUniqueDieIdIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
521  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
522  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
523 
524  bool isRequested = false;
525  uint64_t signalData = 0u;
526 
527  /* get MCU unique die id information bit from the CAN message */
529  messageData,
532  &signalData,
533  endianness);
534  if (signalData == 1u) {
535  isRequested = true;
536  }
537  return isRequested;
538 }
539 
541  /* send the debug message containing the MCU unique die id information and trap if this does not work */
544  }
545 }
546 
547 static bool CANRX_CheckIfMcuLotNumberIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
548  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
549  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
550 
551  bool isRequested = false;
552  uint64_t signalData = 0u;
553 
554  /* get MCU lot number information bit from the CAN message */
556  messageData,
559  &signalData,
560  endianness);
561  if (signalData == 1u) {
562  isRequested = true;
563  }
564  return isRequested;
565 }
566 
568  /* send the debug message containing the MCU lot number information and trap if this does not work */
571  }
572 }
573 
574 static bool CANRX_CheckIfMcuWaferInformationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
575  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
576  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
577 
578  bool isRequested = false;
579  uint64_t signalData = 0u;
580 
581  /* get MCU wafer information bit from the CAN message */
583  messageData,
586  &signalData,
587  endianness);
588  if (signalData == 1u) {
589  isRequested = true;
590  }
591  return isRequested;
592 }
593 
595  /* send the debug message containing the MCU wafer information and trap if this does not work */
598  }
599 }
600 static bool CANRX_CheckIfCommitHashIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
601  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
602  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
603 
604  bool isRequested = false;
605  uint64_t signalData = 0u;
606 
607  /* get MCU wafer information bit from the CAN message */
609  messageData,
612  &signalData,
613  endianness);
614  if (signalData == 1u) {
615  isRequested = true;
616  }
617  return isRequested;
618 }
619 
621  /* send the debug message containing the MCU wafer information and trap if this does not work */
624  }
625 }
626 
627 static void CANRX_ProcessVersionInformationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
628  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
629  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
630 
631  /* check if any of the version information is requested and if so transmit the information */
632  if (CANRX_CheckIfBmsSoftwareVersionIsRequested(messageData, endianness) == true) {
634  }
635  if (CANRX_CheckIfMcuUniqueDieIdIsRequested(messageData, endianness) == true) {
637  }
638  if (CANRX_CheckIfMcuLotNumberIsRequested(messageData, endianness) == true) {
640  }
641  if (CANRX_CheckIfMcuWaferInformationIsRequested(messageData, endianness) == true) {
643  }
644  if (CANRX_CheckIfCommitHashIsRequested(messageData, endianness) == true) {
646  }
647 }
648 
649 static bool CANRX_CheckIfSoftwareResetIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
650  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
651  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
652 
653  bool isRequested = false;
654  uint64_t signalData = 0u;
655 
656  /* get software reset bit from the CAN message */
658  messageData,
661  &signalData,
662  endianness);
663  if (signalData == 1u) {
664  isRequested = true;
665  }
666  return isRequested;
667 }
668 
669 static bool CANRX_CheckIfFramInitializationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
670  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
671  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
672 
673  bool isRequested = false;
674  uint64_t signalData = 0u;
675 
676  /* get software reset bit from the CAN message */
678  messageData,
681  &signalData,
682  endianness);
683  if (signalData == 1u) {
684  isRequested = true;
685  }
686  return isRequested;
687 }
688 
689 static void CANRX_ProcessSoftwareResetMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
690  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
691  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
692 
693  /* trigger software reset, if requested*/
694  if (CANRX_CheckIfSoftwareResetIsRequested(messageData, endianness) == true) {
696  }
697 }
698 
699 static void CANRX_ProcessFramInitializationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
700  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
701  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
702 
703  /* trigger FRAM initialization, if requested*/
704  if (CANRX_CheckIfFramInitializationIsRequested(messageData, endianness) == true) {
706  }
707 }
708 
709 static void CANRX_ProcessTimeInfoMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
710  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
711  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
712 
713  /* trigger RTC time information message, if requested*/
714  if (CANRX_CheckIfTimeInfoIsRequested(messageData, endianness) == true) {
716  }
717 }
718 
719 static bool CANRX_CheckIfTimeInfoIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
720  /* AXIVION Routine Generic-MissingParameterAssert: messageData: parameter accept whole range */
721  FAS_ASSERT(endianness == CAN_BIG_ENDIAN);
722 
723  bool isRequested = false;
724  uint64_t signalData = 0u;
725 
726  /* get RTC time information bit from the CAN message */
728  messageData,
731  &signalData,
732  endianness);
733  if (signalData == 1u) {
734  isRequested = true;
735  }
736  return isRequested;
737 }
738 
739 static void CANRX_TriggerTimeInfoMessage(void) {
740  /* send the debug message containing the RTC time information and trap if this does not work */
743  }
744 }
745 
746 /*========== Extern Function Implementations ================================*/
747 extern uint32_t CANRX_Debug(
748  CAN_MESSAGE_PROPERTIES_s message,
749  const uint8_t *const kpkCanData,
750  const CAN_SHIM_s *const kpkCanShim) {
751  FAS_ASSERT(message.id == CANRX_DEBUG_ID);
754  FAS_ASSERT(kpkCanData != NULL_PTR);
755  FAS_ASSERT(kpkCanShim != NULL_PTR);
756 
757  uint64_t messageData = 0u;
758  uint64_t muxValue = 0u;
759 
760  /* Get the message data and retrieve the multiplexer value from it*/
761  CAN_RxGetMessageDataFromCanData(&messageData, kpkCanData, message.endianness);
764 
765  /* process the respective handler function per supported multiplexer value;
766  in case of an unsupported multiplexer value, transmit that information
767  on the CAN bus. */
768  switch (muxValue) {
770  CANRX_ProcessVersionInformationMux(messageData, message.endianness);
771  break;
773  CANRX_ProcessRtcMux(messageData, message.endianness);
774  break;
776  CANRX_ProcessSoftwareResetMux(messageData, message.endianness);
777  break;
779  CANRX_ProcessFramInitializationMux(messageData, message.endianness);
780  break;
782  CANRX_ProcessTimeInfoMux(messageData, message.endianness);
783  break;
784  default:
785  CANTX_UnsupportedMultiplexerValue(message.id, (uint32_t)muxValue);
786  break;
787  }
788  return 0u;
789 }
790 
791 /*========== Externalized Static Function Implementations (Unit Test) =======*/
792 #ifdef UNITY_UNIT_TEST
793 
794 /* export RTC helper functions */
795 extern uint8_t TEST_CANRX_GetHundredthOfSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
796  return CANRX_GetHundredthOfSeconds(messageData, endianness);
797 }
798 extern uint8_t TEST_CANRX_GetSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
799  return CANRX_GetSeconds(messageData, endianness);
800 }
801 extern uint8_t TEST_CANRX_GetMinutes(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
802  return CANRX_GetMinutes(messageData, endianness);
803 }
804 extern uint8_t TEST_CANRX_GetHours(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
805  return CANRX_GetHours(messageData, endianness);
806 }
807 extern uint8_t TEST_CANRX_GetWeekday(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
808  return CANRX_GetWeekday(messageData, endianness);
809 }
810 extern uint8_t TEST_CANRX_GetDay(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
811  return CANRX_GetDay(messageData, endianness);
812 }
813 extern uint8_t TEST_CANRX_GetMonth(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
814  return CANRX_GetMonth(messageData, endianness);
815 }
816 extern uint8_t TEST_CANRX_GetYear(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
817  return CANRX_GetYear(messageData, endianness);
818 }
819 
820 /* export actions */
821 extern void TEST_CANRX_TriggerBmsSoftwareVersionMessage(void) {
823 }
824 extern void TEST_CANRX_TriggerMcuUniqueDieIdMessage(void) {
826 }
827 extern void TEST_CANRX_TriggerMcuLotNumberMessage(void) {
829 }
830 extern void TEST_CANRX_TriggerMcuWaferInformationMessage(void) {
832 }
833 extern void TEST_CANRX_TriggerTimeInfoMessage(void) {
835 }
836 extern void TEST_CANRX_TriggerCommitHashMessage(void) {
838 }
839 
840 /* export check if functions */
841 extern bool TEST_CANRX_CheckIfBmsSoftwareVersionIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
842  return CANRX_CheckIfBmsSoftwareVersionIsRequested(messageData, endianness);
843 }
844 extern bool TEST_CANRX_CheckIfMcuUniqueDieIdIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
845  return CANRX_CheckIfMcuUniqueDieIdIsRequested(messageData, endianness);
846 }
847 extern bool TEST_CANRX_CheckIfMcuLotNumberIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
848  return CANRX_CheckIfMcuLotNumberIsRequested(messageData, endianness);
849 }
850 extern bool TEST_CANRX_CheckIfMcuWaferInformationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
851  return CANRX_CheckIfMcuWaferInformationIsRequested(messageData, endianness);
852 }
853 extern bool TEST_CANRX_CheckIfSoftwareResetIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
854  return CANRX_CheckIfSoftwareResetIsRequested(messageData, endianness);
855 }
856 extern bool TEST_CANRX_CheckIfFramInitializationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
857  return CANRX_CheckIfFramInitializationIsRequested(messageData, endianness);
858 }
859 extern bool TEST_CANRX_CheckIfTimeInfoIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
860  return CANRX_CheckIfTimeInfoIsRequested(messageData, endianness);
861 }
862 extern bool TEST_CANRX_CheckIfCommitHashIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
863  return CANRX_CheckIfCommitHashIsRequested(messageData, endianness);
864 }
865 
866 /* export mux processing functions */
867 extern void TEST_CANRX_ProcessVersionInformationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
868  CANRX_ProcessVersionInformationMux(messageData, endianness);
869 }
870 extern void TEST_CANRX_ProcessRtcMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
871  CANRX_ProcessRtcMux(messageData, endianness);
872 }
873 extern void TEST_CANRX_ProcessSoftwareResetMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
874  CANRX_ProcessSoftwareResetMux(messageData, endianness);
875 }
876 extern void TEST_CANRX_ProcessFramInitializationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
877  CANRX_ProcessFramInitializationMux(messageData, endianness);
878 }
879 extern void TEST_CANRX_ProcessTimeInfoMux(uint64_t messageData, CAN_ENDIANNESS_e endianness) {
880  CANRX_ProcessTimeInfoMux(messageData, endianness);
881 }
882 
883 #endif
CAN callbacks header.
#define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_REQUEST_RTC_TIME_LENGTH
#define CANRX_DEBUG_MESSAGE_MUX_VALUE_RTC
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_BMS_SOFTWARE_VERSION_LENGTH
#define CANRX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_LENGTH
static bool CANRX_CheckIfMcuLotNumberIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if the MCU lot number information is requested.
#define CANRX_DEBUG_MESSAGE_MUX_VALUE_VERSION_INFORMATION
static bool CANRX_CheckIfTimeInfoIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if the RTC time information is requested.
static bool CANRX_CheckIfMcuWaferInformationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if the MCU wafer information is requested.
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_LOT_NUMBER_LENGTH
#define CANRX_MUX_RTC_SIGNAL_HOURS_LENGTH
#define CANRX_DEBUG_MESSAGE_MUX_LENGTH
static void CANRX_TriggerBmsSoftwareVersionMessage(void)
Triggers sending of the BMS software version information message.
static void CANRX_ProcessTimeInfoMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses CAN message to handle time information requests.
static bool CANRX_CheckIfFramInitializationIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if a FRAM initialization is requested.
#define CANRX_DEBUG_MESSAGE_MUX_VALUE_FRAM_INITIALIZATION
#define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_FRAM_INITIALIZATION_LENGTH
#define CANRX_MUX_RTC_SIGNAL_DAY_START_BIT
#define CANRX_MUX_RTC_SIGNAL_MINUTES_LENGTH
#define CANRX_MUX_RTC_SIGNAL_YEAR_START_BIT
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_LOT_NUMBER_START_BIT
static bool CANRX_CheckIfSoftwareResetIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if a software reset is requested.
#define CANRX_DEBUG_MESSAGE_MUX_VALUE_SOFTWARE_RESET
static void CANRX_TriggerMcuUniqueDieIdMessage(void)
Triggers sending of the MCU die ID information message.
#define CANRX_MUX_RTC_SIGNAL_WEEKDAY_LENGTH
#define CANRX_DEBUG_MESSAGE_MUX_VALUE_TIME_INFO
static uint8_t CANRX_GetMinutes(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the minutes information.
static void CANRX_ProcessFramInitializationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses CAN message related to FRAM initialization.
static uint8_t CANRX_GetHundredthOfSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the hundredth of seconds information.
static void CANRX_ProcessSoftwareResetMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses CAN message to handle software related requests, e.g., a software reset of the BMS.
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_COMMIT_HASH_START_BIT
static void CANRX_ProcessVersionInformationMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses CAN message to handle version related messages.
static uint8_t CANRX_GetMonth(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the month information.
static uint8_t CANRX_GetSeconds(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the seconds information.
#define CANRX_MUX_RTC_SIGNAL_MINUTES_START_BIT
static uint8_t CANRX_GetHours(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the hours information.
#define CANRX_MUX_RTC_SIGNAL_YEAR_LENGTH
uint32_t CANRX_Debug(CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
can rx callback function for debug messages
#define CANRX_MUX_RTC_SIGNAL_DAY_LENGTH
static bool CANRX_CheckIfCommitHashIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if the commit hash is requested.
static uint8_t CANRX_GetDay(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the day information.
#define CANRX_MUX_RTC_SIGNAL_WEEKDAY_START_BIT
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_UNIQUE_DIE_ID_LENGTH
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_WAFER_INFORMATION_LENGTH
#define CANRX_MUX_RTC_SIGNAL_MONTH_START_BIT
#define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_SOFTWARE_RESET_LENGTH
#define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_REQUEST_RTC_TIME_START_BIT
#define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_SOFTWARE_RESET_START_BIT
#define CANRX_MUX_RTC_SIGNAL_MONTH_LENGTH
static void CANRX_ProcessRtcMux(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses CAN message to set the RTC clock.
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_WAFER_INFORMATION_START_BIT
#define CANRX_MUX_SOFTWARE_SIGNAL_TRIGGER_FRAM_INITIALIZATION_START_BIT
#define CANRX_MUX_RTC_SIGNAL_HUNDREDTH_OF_SECONDS_START_BIT
static void CANRX_TriggerCommitHashMessage(void)
Triggers sending of the commit hash message.
#define CANRX_MUX_RTC_SIGNAL_HOURS_START_BIT
static uint8_t CANRX_GetYear(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the year information.
static bool CANRX_CheckIfBmsSoftwareVersionIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if the BMS software version information is requested.
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_MCU_UNIQUE_DIE_ID_START_BIT
static bool CANRX_CheckIfMcuUniqueDieIdIsRequested(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Check if the MCU die ID information is requested.
static void CANRX_TriggerMcuLotNumberMessage(void)
Triggers sending of the MCU lot number information message.
#define CANRX_MUX_RTC_SIGNAL_SECONDS_START_BIT
#define CANRX_DEBUG_MESSAGE_MUX_START_BIT
#define CANRX_MUX_RTC_SIGNAL_SECONDS_LENGTH
static void CANRX_TriggerMcuWaferInformationMessage(void)
Triggers sending of the MCU wafer information message.
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_BMS_SOFTWARE_VERSION_START_BIT
static uint8_t CANRX_GetWeekday(uint64_t messageData, CAN_ENDIANNESS_e endianness)
Parses the CAN message to retrieve the weekday information.
#define CANRX_MUX_VERSION_INFO_SIGNAL_GET_COMMIT_HASH_LENGTH
static void CANRX_TriggerTimeInfoMessage(void)
Triggers sending of the RTC time information message.
STD_RETURN_TYPE_e CANTX_DebugResponse(CANTX_DEBUG_RESPONSE_ACTIONS_e action)
Handles Debug response message.
Declarations for handling the transmit of debug response messages.
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_LOT_NUMBER
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_UNIQUE_DIE_ID
@ CANTX_DEBUG_RESPONSE_TRANSMIT_RTC_TIME
@ CANTX_DEBUG_RESPONSE_TRANSMIT_COMMIT_HASH
@ CANTX_DEBUG_RESPONSE_TRANSMIT_MCU_WAFER_INFORMATION
@ CANTX_DEBUG_RESPONSE_TRANSMIT_BMS_VERSION_INFO
void CANTX_UnsupportedMultiplexerValue(uint32_t messageId, uint32_t multiplexerValue)
Function to generically handle multiplexer values that are not supported in a message.
CAN_ENDIANNESS_e
Definition: can_cfg.h:156
@ CAN_BIG_ENDIAN
Definition: can_cfg.h:158
#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC
Definition: can_cfg.h:106
Header for the driver for the CAN module.
#define CANRX_DEBUG_ID_TYPE
#define CANRX_DEBUG_ID
void CAN_RxGetMessageDataFromCanData(uint64_t *pMessage, const uint8_t *const kpkCanData, CAN_ENDIANNESS_e endianness)
Copy CAN data from 8 bytes to a 64-bit variable.
Definition: can_helper.c:295
void CAN_RxGetSignalDataFromMessageData(uint64_t message, uint64_t bitStart, uint8_t bitLength, uint64_t *pCanSignal, CAN_ENDIANNESS_e endianness)
Gets CAN signal data from a 64-bit variable. This function is used to get signal data from a 64-bit C...
Definition: can_helper.c:255
Headers for the helper functions for the CAN module.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
Definition: fassert.h:255
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
Definition: fassert.h:129
STD_RETURN_TYPE_e FRAM_ReinitializeAllEntries(void)
Reinitialize all entries in the FRAM.
Definition: fram.c:116
Header for the driver for the FRAM module.
@ STD_OK
Definition: fstd_types.h:83
#define NULL_PTR
Null pointer.
Definition: fstd_types.h:77
Header of task driver implementation.
OS_QUEUE ftsk_rtcSetTimeQueue
@ OS_SUCCESS
Definition: os.h:86
OS_STD_RETURN_e OS_SendToBackOfQueue(OS_QUEUE xQueue, const void *const pvItemToQueue, uint32_t ticksToWait)
Post an item to the back the provided queue.
Definition: os_freertos.c:277
void SYS_TriggerSoftwareReset(void)
Trigger a software reset of the BMS.
Definition: reset.c:72
Software reset driver header.
Header file of the RTC driver.
CAN_IDENTIFIER_TYPE_e idType
Definition: can_cfg.h:201
CAN_ENDIANNESS_e endianness
Definition: can_cfg.h:203
uint8_t hours
Definition: rtc.h:77
uint8_t minutes
Definition: rtc.h:76
uint8_t seconds
Definition: rtc.h:75
uint8_t month
Definition: rtc.h:80
uint8_t weekday
Definition: rtc.h:78
uint8_t hundredthOfSeconds
Definition: rtc.h:74
uint8_t year
Definition: rtc.h:81
uint8_t day
Definition: rtc.h:79