Revision cda14729 modules/aos_chconf.h
modules/aos_chconf.h | ||
---|---|---|
175 | 175 |
* @note The default is @p TRUE. |
176 | 176 |
*/ |
177 | 177 |
#if !defined(CH_CFG_USE_REGISTRY) |
178 |
#define CH_CFG_USE_REGISTRY FALSE
|
|
178 |
#define CH_CFG_USE_REGISTRY TRUE
|
|
179 | 179 |
#endif |
180 | 180 |
|
181 | 181 |
/** |
... | ... | |
628 | 628 |
* @brief System structure extension. |
629 | 629 |
* @details User fields added to the end of the @p ch_system_t structure. |
630 | 630 |
*/ |
631 |
#if !defined(CH_CFG_SYSTEM_EXTRA_FIELDS) |
|
631 | 632 |
#define CH_CFG_SYSTEM_EXTRA_FIELDS \ |
632 | 633 |
/* Add threads custom fields here.*/ |
634 |
#endif |
|
633 | 635 |
|
634 | 636 |
/** |
635 | 637 |
* @brief System initialization hook. |
636 | 638 |
* @details User initialization code added to the @p chSysInit() function |
637 | 639 |
* just before interrupts are enabled globally. |
638 | 640 |
*/ |
641 |
#if !defined(CH_CFG_SYSTEM_INIT_HOOK) |
|
639 | 642 |
#define CH_CFG_SYSTEM_INIT_HOOK() { \ |
640 | 643 |
/* Add threads initialization code here.*/ \ |
641 | 644 |
} |
645 |
#endif |
|
642 | 646 |
|
643 | 647 |
/** |
644 | 648 |
* @brief Threads descriptor structure extension. |
645 | 649 |
* @details User fields added to the end of the @p thread_t structure. |
646 | 650 |
*/ |
651 |
#if !defined(CH_CFG_THREAD_EXTRA_FIELDS) |
|
647 | 652 |
#define CH_CFG_THREAD_EXTRA_FIELDS \ |
648 | 653 |
/* Add threads custom fields here.*/ |
654 |
#endif |
|
649 | 655 |
|
650 | 656 |
/** |
651 | 657 |
* @brief Threads initialization hook. |
... | ... | |
654 | 660 |
* @note It is invoked from within @p _thread_init() and implicitly from all |
655 | 661 |
* the threads creation APIs. |
656 | 662 |
*/ |
663 |
#if !defined(CH_CFG_THREAD_INIT_HOOK) |
|
657 | 664 |
#define CH_CFG_THREAD_INIT_HOOK(tp) { \ |
658 | 665 |
/* Add threads initialization code here.*/ \ |
659 | 666 |
} |
667 |
#endif |
|
660 | 668 |
|
661 | 669 |
/** |
662 | 670 |
* @brief Threads finalization hook. |
663 | 671 |
* @details User finalization code added to the @p chThdExit() API. |
664 | 672 |
*/ |
673 |
#if !defined(CH_CFG_THREAD_EXIT_HOOK) |
|
665 | 674 |
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ |
666 | 675 |
/* Add threads finalization code here.*/ \ |
667 | 676 |
} |
677 |
#endif |
|
668 | 678 |
|
669 | 679 |
/** |
670 | 680 |
* @brief Context switch hook. |
671 | 681 |
* @details This hook is invoked just before switching between threads. |
672 | 682 |
*/ |
683 |
#if !defined(CH_CFG_CONTEXT_SWITCH_HOOK) |
|
673 | 684 |
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ |
674 | 685 |
/* Context switch code here.*/ \ |
675 | 686 |
} |
687 |
#endif |
|
676 | 688 |
|
677 | 689 |
/** |
678 | 690 |
* @brief ISR enter hook. |
679 | 691 |
*/ |
692 |
#if !defined(CH_CFG_IRQ_PROLOGUE_HOOK) |
|
680 | 693 |
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ |
681 | 694 |
/* IRQ prologue code here.*/ \ |
682 | 695 |
} |
696 |
#endif |
|
683 | 697 |
|
684 | 698 |
/** |
685 | 699 |
* @brief ISR exit hook. |
686 | 700 |
*/ |
701 |
#if !defined(CH_CFG_IRQ_EPILOGUE_HOOK) |
|
687 | 702 |
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ |
688 | 703 |
/* IRQ epilogue code here.*/ \ |
689 | 704 |
} |
705 |
#endif |
|
690 | 706 |
|
691 | 707 |
/** |
692 | 708 |
* @brief Idle thread enter hook. |
... | ... | |
694 | 710 |
* should be invoked from here. |
695 | 711 |
* @note This macro can be used to activate a power saving mode. |
696 | 712 |
*/ |
713 |
#if !defined(CH_CFG_IDLE_ENTER_HOOK) |
|
697 | 714 |
#define CH_CFG_IDLE_ENTER_HOOK() { \ |
698 | 715 |
/* Idle-enter code here.*/ \ |
699 | 716 |
} |
717 |
#endif |
|
700 | 718 |
|
701 | 719 |
/** |
702 | 720 |
* @brief Idle thread leave hook. |
... | ... | |
704 | 722 |
* should be invoked from here. |
705 | 723 |
* @note This macro can be used to deactivate a power saving mode. |
706 | 724 |
*/ |
725 |
#if !defined(CH_CFG_IDLE_LEAVE_HOOK) |
|
707 | 726 |
#define CH_CFG_IDLE_LEAVE_HOOK() { \ |
708 | 727 |
/* Idle-leave code here.*/ \ |
709 | 728 |
} |
729 |
#endif |
|
710 | 730 |
|
711 | 731 |
/** |
712 | 732 |
* @brief Idle Loop hook. |
713 | 733 |
* @details This hook is continuously invoked by the idle thread loop. |
714 | 734 |
*/ |
735 |
#if !defined(CH_CFG_IDLE_LOOP_HOOK) |
|
715 | 736 |
#define CH_CFG_IDLE_LOOP_HOOK() { \ |
716 | 737 |
/* Idle loop code here.*/ \ |
717 | 738 |
} |
739 |
#endif |
|
718 | 740 |
|
719 | 741 |
/** |
720 | 742 |
* @brief System tick event hook. |
721 | 743 |
* @details This hook is invoked in the system tick handler immediately |
722 | 744 |
* after processing the virtual timers queue. |
723 | 745 |
*/ |
746 |
#if !defined(CH_CFG_SYSTEM_TICK_HOOK) |
|
724 | 747 |
#define CH_CFG_SYSTEM_TICK_HOOK() { \ |
725 | 748 |
/* System tick event code here.*/ \ |
726 | 749 |
} |
750 |
#endif |
|
727 | 751 |
|
728 | 752 |
/** |
729 | 753 |
* @brief System halt hook. |
730 | 754 |
* @details This hook is invoked in case to a system halting error before |
731 | 755 |
* the system is halted. |
732 | 756 |
*/ |
757 |
#if !defined(CH_CFG_SYSTEM_HALT_HOOK) |
|
733 | 758 |
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ |
734 | 759 |
/* System halt code here.*/ \ |
735 | 760 |
} |
761 |
#endif |
|
736 | 762 |
|
737 | 763 |
/** |
738 | 764 |
* @brief Trace hook. |
739 | 765 |
* @details This hook is invoked each time a new record is written in the |
740 | 766 |
* trace buffer. |
741 | 767 |
*/ |
768 |
#if !defined(CH_CFG_TRACE_HOOK) |
|
742 | 769 |
#define CH_CFG_TRACE_HOOK(tep) { \ |
743 | 770 |
/* Trace code here.*/ \ |
744 | 771 |
} |
772 |
#endif |
|
745 | 773 |
|
746 | 774 |
/** @} */ |
747 | 775 |
|
Also available in: Unified diff