HALFRED  0.4.0
hal_diag.h
Go to the documentation of this file.
1 
10 #ifndef HAL_DIAG_H
11 #define HAL_DIAG_H
12 
13 #include "hal_config.h"
14 #include "hal_defs.h"
15 #include "hal_iodevice.h"
16 #include "hal_iobuf.h"
17 
18 #if (1 == HAL_ENABLE_OS)
19 #include "hal_os.h"
20 #endif
21 
22 #include <stdint.h>
23 #include <stdlib.h>
24 #include <stdbool.h>
25 #include <stdarg.h>
26 
27 
28 
228 
229 // -----------------------------------------------------------------------------
230 // GLOBAL MACROS
231 // -----------------------------------------------------------------------------
233 #define DIAG_DEFAULT_CHANNEL 0
234 
235 #ifndef HAL_ENABLE_DIAG
236 
237 #define HAL_ENABLE_DIAG 0
238 #endif
239 
240 
241 #ifndef HAL_DIAG_LEVEL
242 
243 #define HAL_DIAG_LEVEL 0
244 #endif
245 
246 #ifndef HAL_DIAG_LOCK_TIMEOUT
247 
248 #define HAL_DIAG_LOCK_TIMEOUT 1000
249 #endif
250 
251 #ifndef HAL_DIAG_USE_CALENDAR_TIME
252 
253 #define HAL_DIAG_USE_CALENDAR_TIME 0
254 #endif
255 
256 // -----------------------------------------------------------------------------
257 // Level-independent API
258 // -----------------------------------------------------------------------------
259 
260 #if (1 == HAL_ENABLE_OS)
261 typedef OSTime (*DIAGClockSource)(void);
262 #else
263 typedef uint32_t (*DIAGClockSource)(void);
264 #endif
265 
272 #define DIAG_ASSERT(channel, condition) if (!(condition)) do { \
273  if (HALRESULT_OK == DIAG_Lock((channel), HAL_DIAG_LOCK_TIMEOUT)) { \
274  DIAG0_LogMsg((channel), "Assertion failed in " __FILE__ ":"); \
275  DIAG0_LogUINT((channel), __LINE__, 10); \
276  DIAG0_LogNL(channel); \
277  DIAG_Unlock((channel)); \
278  } \
279 } while (0)
280 
288 #define DIAG_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT(channel, condition); else
289 #if (1 == HAL_ENABLE_OS)
290 HALRESULT DIAG_Lock(unsigned int channel, OSTime timeout);
291 void DIAG_Unlock(unsigned int channel);
292 #else
293 #define DIAG_Lock(ignored1, ignored2) (HALRESULT_OK)
294 #define DIAG_Unlock(ignored) (void)0
295 #endif
296 
299 void DIAG_Init(void);
300 
304 void DIAG_Deinit(void);
305 
315 HALRESULT DIAG_SetOutputDevice(unsigned int channel, IODevice iodevice);
316 
323 IODevice DIAG_GetOutputDevice(unsigned int channel);
324 
332 HALRESULT DIAG_ActivateChannel(unsigned int channel);
333 
341 HALRESULT DIAG_DeactivateChannel(unsigned int channel);
342 
350 bool DIAG_IsChannelActive(unsigned int channel);
351 
362 HALRESULT DIAG_SetClockSource(unsigned int channel, DIAGClockSource clk_src);
363 
364 #if (1 == HAL_ENABLE_CLI)
365 
373 HALRESULT DIAG_BindCLIConsole(unsigned int channel, CLIConsole cli);
374 #endif
375 
382 void DIAG_Log(unsigned int channel, const char * str, ...);
383 
390 void DIAG_LogChar(unsigned int channel, char character);
391 
398 void DIAG_LogMsg(unsigned int channel, const char* msg);
399 
407 void DIAG_LogINT(unsigned int channel, int32_t value, uint8_t base);
408 
416 void DIAG_LogUINT(unsigned int channel, uint32_t value, uint8_t base);
417 
425 void DIAG_LogUINT64(unsigned int channel, uint64_t value, uint8_t base);
426 
434 void DIAG_LogINT64(unsigned int channel, int64_t value, uint8_t base);
435 
444 void DIAG_LogFLOAT(unsigned int channel, float value, uint8_t precision);
445 
451 void DIAG_LogNL(unsigned int channel);
452 
459 void DIAG_LogHeader(unsigned int channel, const char* module);
460 
471 void DIAG_LogData(unsigned int channel, uint8_t* data, size_t size, int base, int spacing, const char* space);
472 
480 void DIAG_LogIOBuf(unsigned int channel, IOBuf iobuf, int indent);
481 
491 void DIAG_ReportError(unsigned int channel, uint16_t error_no, uint32_t code_line, void* user_data, const char* description);
492 
502 uint32_t DIAG_ProcessErrors(size_t max_error_count);
503 
508 void DIAG_SetErrorHandler( int (*error_handler)(unsigned int, uint16_t, uint16_t, void*, const char*));
509 
510 // -----------------------------------------------------------------------------
511 // Level-dependent API
512 // -----------------------------------------------------------------------------
513 
516 #if (1 == HAL_ENABLE_DIAG)
517 // Channel 0 cannot be turned off if diagnostics is enabled
518 #define DIAG0_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
519 #define DIAG0_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
520 #define DIAG0_Lock(channel, timeout) DIAG_Lock(channel, timeout)
521 #define DIAG0_Unlock(channel) DIAG_Unlock(channel)
522 #define DIAG0_LogChar(channel, character) DIAG_LogChar(channel, character)
523 #define DIAG0_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
524 #define DIAG0_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
525 #define DIAG0_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
526 #define DIAG0_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
527 #define DIAG0_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
528 #define DIAG0_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
529 #define DIAG0_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
530 #define DIAG0_LogNL(channel) DIAG_LogNL(channel)
531 #define DIAG0_LogHeader(channel, module) DIAG_LogHeader(channel, module)
532 #else
533 // No diagnostics
534 #define DIAG0_ASSERT(channel, condition) if(condition) { ; }
535 #define DIAG0_ASSERT_AND_EXECUTE(channel, condition) if(condition)
536 #define DIAG0_Lock(channel, timeout)
537 #define DIAG0_Unlock(channel)
538 #define DIAG0_LogChar(channel, character)
539 #define DIAG0_LogMsg(channel, msg)
540 #define DIAG0_LogINT(channel, value, base)
541 #define DIAG0_LogUINT(channel, value, base)
542 #define DIAG0_LogINT64(channel, value, base)
543 #define DIAG0_LogUINT64(channel, value, base)
544 #define DIAG0_LogFLOAT(channel, value, precision)
545 #define DIAG0_LogData(channel, data, size, base, spacing, space)
546 #define DIAG0_LogNL(channel)
547 #define DIAG0_LogHeader(channel, module)
548 #endif
549 
550 
551 #if (1 == HAL_ENABLE_DIAG) && (HAL_DIAG_LEVEL >= 1)
552 #define DIAG1_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
553 #define DIAG1_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
554 #define DIAG1_Lock(channel, timeout) DIAG_Lock(channel, timeout)
555 #define DIAG1_Unlock(channel) DIAG_Unlock(channel)
556 #define DIAG1_LogChar(channel, character) DIAG_LogChar(channel, character)
557 #define DIAG1_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
558 #define DIAG1_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
559 #define DIAG1_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
560 #define DIAG1_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
561 #define DIAG1_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
562 #define DIAG1_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
563 #define DIAG1_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
564 #define DIAG1_LogNL(channel) DIAG_LogNL(channel)
565 #define DIAG1_LogHeader(channel, module) DIAG_LogHeader(channel, module)
566 #else
567 #define DIAG1_ASSERT(channel, condition) if(condition) { ; }
568 #define DIAG1_ASSERT_AND_EXECUTE(channel, condition) if(condition)
569 #define DIAG1_Lock(channel, timeout)
570 #define DIAG1_Unlock(channel)
571 #define DIAG1_LogChar(channel, character)
572 #define DIAG1_LogMsg(channel, msg)
573 #define DIAG1_LogINT(channel, value, base)
574 #define DIAG1_LogUINT(channel, value, base)
575 #define DIAG1_LogINT64(channel, value, base)
576 #define DIAG1_LogUINT64(channel, value, base)
577 #define DIAG1_LogFLOAT(channel, value, precision)
578 #define DIAG1_LogData(channel, data, size, base, spacing, space)
579 #define DIAG1_LogNL(channel)
580 #define DIAG1_LogHeader(channel, module)
581 #endif
582 
583 #if (1 == HAL_ENABLE_DIAG) && (HAL_DIAG_LEVEL >= 2)
584 #define DIAG2_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
585 #define DIAG2_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
586 #define DIAG2_Lock(channel, timeout) DIAG_Lock(channel, timeout)
587 #define DIAG2_Unlock(channel) DIAG_Unlock(channel)
588 #define DIAG2_LogChar(channel, character) DIAG_LogChar(channel, character)
589 #define DIAG2_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
590 #define DIAG2_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
591 #define DIAG2_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
592 #define DIAG2_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
593 #define DIAG2_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
594 #define DIAG2_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
595 #define DIAG2_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
596 #define DIAG2_LogNL(channel) DIAG_LogNL(channel)
597 #define DIAG2_LogHeader(channel, module) DIAG_LogHeader(channel, module)
598 #else
599 #define DIAG2_ASSERT(channel, condition) if(condition) { ; }
600 #define DIAG2_ASSERT_AND_EXECUTE(channel, condition) if(condition)
601 #define DIAG2_Lock(channel, timeout)
602 #define DIAG2_Unlock(channel)
603 #define DIAG2_LogChar(channel, character)
604 #define DIAG2_LogMsg(channel, msg)
605 #define DIAG2_LogINT(channel, value, base)
606 #define DIAG2_LogUINT(channel, value, base)
607 #define DIAG2_LogINT64(channel, value, base)
608 #define DIAG2_LogUINT64(channel, value, base)
609 #define DIAG2_LogFLOAT(channel, value, precision)
610 #define DIAG2_LogData(channel, data, size, base, spacing, space)
611 #define DIAG2_LogNL(channel)
612 #define DIAG2_LogHeader(channel, module)
613 #endif
614 
615 #if (1 == HAL_ENABLE_DIAG) && (HAL_DIAG_LEVEL >= 3)
616 #define DIAG3_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
617 #define DIAG3_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
618 #define DIAG3_Lock(channel, timeout) DIAG_Lock(channel, timeout)
619 #define DIAG3_Unlock(channel) DIAG_Unlock(channel)
620 #define DIAG3_LogChar(channel, character) DIAG_LogChar(channel, character)
621 #define DIAG3_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
622 #define DIAG3_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
623 #define DIAG3_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
624 #define DIAG3_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
625 #define DIAG3_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
626 #define DIAG3_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
627 #define DIAG3_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
628 #define DIAG3_LogNL(channel) DIAG_LogNL(channel)
629 #define DIAG3_LogHeader(channel, module) DIAG_LogHeader(channel, module)
630 #else
631 #define DIAG3_ASSERT(channel, condition) if(condition) { ; }
632 #define DIAG3_ASSERT_AND_EXECUTE(channel, condition) if(condition)
633 #define DIAG3_Lock(channel, timeout)
634 #define DIAG3_Unlock(channel)
635 #define DIAG3_LogChar(channel, character)
636 #define DIAG3_LogMsg(channel, msg)
637 #define DIAG3_LogINT(channel, value, base)
638 #define DIAG3_LogUINT(channel, value, base)
639 #define DIAG3_LogINT64(channel, value, base)
640 #define DIAG3_LogUINT64(channel, value, base)
641 #define DIAG3_LogFLOAT(channel, value, precision)
642 #define DIAG3_LogData(channel, data, size, base, spacing, space)
643 #define DIAG3_LogNL(channel)
644 #define DIAG3_LogHeader(channel, module)
645 #endif
646 
647 #if (1 == HAL_ENABLE_DIAG) && (HAL_DIAG_LEVEL >= 4)
648 #define DIAG4_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
649 #define DIAG4_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
650 #define DIAG4_Lock(channel, timeout) DIAG_Lock(channel, timeout)
651 #define DIAG4_Unlock(channel) DIAG_Unlock(channel)
652 #define DIAG4_LogChar(channel, character) DIAG_LogChar(channel, character)
653 #define DIAG4_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
654 #define DIAG4_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
655 #define DIAG4_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
656 #define DIAG4_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
657 #define DIAG4_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
658 #define DIAG4_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
659 #define DIAG4_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
660 #define DIAG4_LogNL(channel) DIAG_LogNL(channel)
661 #define DIAG4_LogHeader(channel, module) DIAG_LogHeader(channel, module)
662 #else
663 #define DIAG4_ASSERT(channel, condition) if(condition) { ; }
664 #define DIAG4_ASSERT_AND_EXECUTE(channel, condition) if(condition)
665 #define DIAG4_Lock(channel, timeout)
666 #define DIAG4_Unlock(channel)
667 #define DIAG4_LogChar(channel, character)
668 #define DIAG4_LogMsg(channel, msg)
669 #define DIAG4_LogINT(channel, value, base)
670 #define DIAG4_LogUINT(channel, value, base)
671 #define DIAG4_LogINT64(channel, value, base)
672 #define DIAG4_LogUINT64(channel, value, base)
673 #define DIAG4_LogFLOAT(channel, value, precision)
674 #define DIAG4_LogData(channel, data, size, base, spacing, space)
675 #define DIAG4_LogNL(channel)
676 #define DIAG4_LogHeader(channel, module)
677 #endif
678 
679 #if (1 == HAL_ENABLE_DIAG) && (HAL_DIAG_LEVEL >= 5)
680 #define DIAG5_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
681 #define DIAG5_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
682 #define DIAG5_Lock(channel, timeout) DIAG_Lock(channel, timeout)
683 #define DIAG5_Unlock(channel) DIAG_Unlock(channel)
684 #define DIAG5_LogChar(channel, character) DIAG_LogChar(channel, character)
685 #define DIAG5_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
686 #define DIAG5_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
687 #define DIAG5_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
688 #define DIAG5_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
689 #define DIAG5_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
690 #define DIAG5_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
691 #define DIAG5_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
692 #define DIAG5_LogNL(channel) DIAG_LogNL(channel)
693 #define DIAG5_LogHeader(channel, module) DIAG_LogHeader(channel, module)
694 #else
695 #define DIAG5_ASSERT(channel, condition) if(condition) { ; }
696 #define DIAG5_ASSERT_AND_EXECUTE(channel, condition) if(condition)
697 #define DIAG5_Lock(channel, timeout)
698 #define DIAG5_Unlock(channel)
699 #define DIAG5_LogChar(channel, character)
700 #define DIAG5_LogMsg(channel, msg)
701 #define DIAG5_LogINT(channel, value, base)
702 #define DIAG5_LogUINT(channel, value, base)
703 #define DIAG5_LogINT64(channel, value, base)
704 #define DIAG5_LogUINT64(channel, value, base)
705 #define DIAG5_LogFLOAT(channel, value, precision)
706 #define DIAG5_LogData(channel, data, size, base, spacing, space)
707 #define DIAG5_LogNL(channel)
708 #define DIAG5_LogHeader(channel, module)
709 #endif
710 
711 #if (1 == HAL_ENABLE_DIAG) && (HAL_DIAG_LEVEL >= 6)
712 #define DIAG6_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
713 #define DIAG6_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
714 #define DIAG6_Lock(channel, timeout) DIAG_Lock(channel, timeout)
715 #define DIAG6_Unlock(channel) DIAG_Unlock(channel)
716 #define DIAG6_LogChar(channel, character) DIAG_LogChar(channel, character)
717 #define DIAG6_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
718 #define DIAG6_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
719 #define DIAG6_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
720 #define DIAG6_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
721 #define DIAG6_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
722 #define DIAG6_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
723 #define DIAG6_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
724 #define DIAG6_LogNL(channel) DIAG_LogNL(channel)
725 #define DIAG6_LogHeader(channel, module) DIAG_LogHeader(channel, module)
726 #else
727 #define DIAG6_ASSERT(channel, condition) if (condition) { ; }
728 #define DIAG6_ASSERT_AND_EXECUTE(channel, condition) if (condition)
729 #define DIAG6_Lock(channel, timeout)
730 #define DIAG6_Unlock(channel)
731 #define DIAG6_LogChar(channel, character)
732 #define DIAG6_LogMsg(channel, msg)
733 #define DIAG6_LogINT(channel, value, base)
734 #define DIAG6_LogUINT(channel, value, base)
735 #define DIAG6_LogINT64(channel, value, base)
736 #define DIAG6_LogUINT64(channel, value, base)
737 #define DIAG6_LogFLOAT(channel, value, precision)
738 #define DIAG6_LogData(channel, data, size, base, spacing, space)
739 #define DIAG6_LogNL(channel)
740 #define DIAG6_LogHeader(channel, module)
741 #endif
742 
743 #if (1 == HAL_ENABLE_DIAG) && (HAL_DIAG_LEVEL >= 7)
744 #define DIAG7_ASSERT(channel, condition) DIAG_ASSERT(channel, condition)
745 #define DIAG7_ASSERT_AND_EXECUTE(channel, condition) DIAG_ASSERT_AND_EXECUTE(channel, condition)
746 #define DIAG7_Lock(channel, timeout) DIAG_Lock(channel, timeout)
747 #define DIAG7_Unlock(channel) DIAG_Unlock(channel)
748 #define DIAG7_LogChar(channel, character) DIAG_LogChar(channel, character)
749 #define DIAG7_LogMsg(channel, msg) DIAG_LogMsg(channel, msg)
750 #define DIAG7_LogINT(channel, value, base) DIAG_LogINT(channel, value, base)
751 #define DIAG7_LogUINT(channel, value, base) DIAG_LogUINT(channel, value, base)
752 #define DIAG7_LogINT64(channel, value, base) DIAG_LogINT64(channel, value, base)
753 #define DIAG7_LogUINT64(channel, value, base) DIAG_LogUINT64(channel, value, base)
754 #define DIAG7_LogFLOAT(channel, value, precision) DIAG_LogFLOAT(channel, value, precision)
755 #define DIAG7_LogData(channel, data, size, base, spacing, space) DIAG_LogData(channel, data, size, base, spacing, space)
756 #define DIAG7_LogNL(channel) DIAG_LogNL(channel)
757 #define DIAG7_LogHeader(channel, module) DIAG_LogHeader(channel, module)
758 #else
759 #define DIAG7_ASSERT(channel, condition) if(condition) { ; }
760 #define DIAG7_ASSERT_AND_EXECUTE(channel, condition) if(condition)
761 #define DIAG7_Lock(channel, timeout)
762 #define DIAG7_Unlock(channel)
763 #define DIAG7_LogChar(channel, character)
764 #define DIAG7_LogMsg(channel, msg)
765 #define DIAG7_LogINT(channel, value, base)
766 #define DIAG7_LogUINT(channel, value, base)
767 #define DIAG7_LogINT64(channel, value, base)
768 #define DIAG7_LogUINT64(channel, value, base)
769 #define DIAG7_LogFLOAT(channel, value, precision)
770 #define DIAG7_LogData(channel, data, size, base, spacing, space)
771 #define DIAG7_LogNL(channel)
772 #define DIAG7_LogHeader(channel, module)
773 #endif
774 
778 
784 #endif /* HAL_DIAG_H */
IODevice DIAG_GetOutputDevice(unsigned int channel)
void DIAG_LogMsg(unsigned int channel, const char *msg)
HALRESULT
Definition: hal_defs.h:16
void DIAG_Deinit(void)
void DIAG_LogFLOAT(unsigned int channel, float value, uint8_t precision)
HALRESULT DIAG_DeactivateChannel(unsigned int channel)
HALRESULT DIAG_SetClockSource(unsigned int channel, DIAGClockSource clk_src)
IODevice API.
Definition: hali_iodevice.h:44
Command Line Interface Console descriptor.
Definition: hal_cli.h:139
void DIAG_LogUINT(unsigned int channel, uint32_t value, uint8_t base)
void DIAG_Log(unsigned int channel, const char *str,...)
void DIAG_LogChar(unsigned int channel, char character)
void DIAG_LogNL(unsigned int channel)
Ring buffer API.
void DIAG_LogINT(unsigned int channel, int32_t value, uint8_t base)
void DIAG_LogIOBuf(unsigned int channel, IOBuf iobuf, int indent)
void DIAG_SetErrorHandler(int(*error_handler)(unsigned int, uint16_t, uint16_t, void *, const char *))
void DIAG_ReportError(unsigned int channel, uint16_t error_no, uint32_t code_line, void *user_data, const char *description)
Various HAL definitions.
void DIAG_LogData(unsigned int channel, uint8_t *data, size_t size, int base, int spacing, const char *space)
void DIAG_Init(void)
void DIAG_LogINT64(unsigned int channel, int64_t value, uint8_t base)
Operating system (OS) API.
void DIAG_LogUINT64(unsigned int channel, uint64_t value, uint8_t base)
void DIAG_LogHeader(unsigned int channel, const char *module)
HALRESULT DIAG_ActivateChannel(unsigned int channel)
Definition: hal_iobuf.h:88
uint32_t DIAG_ProcessErrors(size_t max_error_count)
bool DIAG_IsChannelActive(unsigned int channel)
HALRESULT DIAG_SetOutputDevice(unsigned int channel, IODevice iodevice)