Revision 7de40828
core/src/aos_main.cpp | ||
---|---|---|
939 | 939 |
#endif |
940 | 940 |
#endif |
941 | 941 |
|
942 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) |
|
943 |
#if defined(MODULE_INIT_TESTS) |
|
944 |
MODULE_INIT_TESTS(); |
|
945 |
#else |
|
946 |
#warning "MODULE_INIT_TESTS() not defined" |
|
947 |
#endif |
|
948 |
#endif |
|
949 |
|
|
950 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_4) |
|
951 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_4_ARGS) |
|
952 |
AMIROOS_CFG_MAIN_INIT_HOOK_4(AMIROOS_CFG_MAIN_INIT_HOOK_4_ARGS); |
|
953 |
#else |
|
954 |
AMIROOS_CFG_MAIN_INIT_HOOK_4(); |
|
955 |
#endif |
|
956 |
#endif |
|
957 |
|
|
958 | 942 |
/* event associations */ |
959 | 943 |
#if (AMIROOS_CFG_SSSP_ENABLE == true) |
960 | 944 |
ioeventflagsmask |= MODULE_SSSP_EVENTFLAGS_PD | MODULE_SSSP_EVENTFLAGS_SYNC; |
... | ... | |
970 | 954 |
} |
971 | 955 |
chEvtRegisterMask(&aos.events.os, &_eventListenerOS, OSEVENT_MASK); |
972 | 956 |
|
973 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_5)
|
|
974 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_5_ARGS)
|
|
975 |
AMIROOS_CFG_MAIN_INIT_HOOK_5(AMIROOS_CFG_MAIN_INIT_HOOK_5_ARGS);
|
|
957 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_4)
|
|
958 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_4_ARGS)
|
|
959 |
AMIROOS_CFG_MAIN_INIT_HOOK_4(AMIROOS_CFG_MAIN_INIT_HOOK_4_ARGS);
|
|
976 | 960 |
#else |
977 |
AMIROOS_CFG_MAIN_INIT_HOOK_5();
|
|
961 |
AMIROOS_CFG_MAIN_INIT_HOOK_4();
|
|
978 | 962 |
#endif |
979 | 963 |
#endif |
980 | 964 |
|
981 | 965 |
/* periphery communication initialization */ |
982 |
#if (AMIROOS_CFG_SSSP_ENABLE == true) |
|
983 |
// CAN (mandatory) |
|
984 |
canStart(&MODULE_HAL_CAN, &moduleHalCanConfig); |
|
985 |
#endif |
|
986 | 966 |
// module specific initialization (if any) |
987 | 967 |
#ifdef MODULE_INIT_PERIPHERY_COMM |
988 | 968 |
MODULE_INIT_PERIPHERY_COMM(); |
989 | 969 |
#endif |
970 |
#if (AMIROOS_CFG_SSSP_ENABLE == true) |
|
971 |
// CAN (mandatory) |
|
972 |
canStart(&MODULE_HAL_CAN, &moduleHalCanConfig); |
|
973 |
#endif |
|
990 | 974 |
// user interface (if any) |
991 | 975 |
#ifdef MODULE_HAL_PROGIF |
992 | 976 |
aosIOChannelInit(&_stdiochannel, (BaseAsynchronousChannel*)&MODULE_HAL_PROGIF); |
... | ... | |
1000 | 984 |
#endif |
1001 | 985 |
#endif |
1002 | 986 |
|
1003 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_6)
|
|
1004 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_6_ARGS)
|
|
1005 |
AMIROOS_CFG_MAIN_INIT_HOOK_6(AMIROOS_CFG_MAIN_INIT_HOOK_6_ARGS);
|
|
987 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_5)
|
|
988 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_5_ARGS)
|
|
989 |
AMIROOS_CFG_MAIN_INIT_HOOK_5(AMIROOS_CFG_MAIN_INIT_HOOK_5_ARGS);
|
|
1006 | 990 |
#else |
1007 |
AMIROOS_CFG_MAIN_INIT_HOOK_6();
|
|
991 |
AMIROOS_CFG_MAIN_INIT_HOOK_5();
|
|
1008 | 992 |
#endif |
1009 | 993 |
#endif |
1010 | 994 |
|
... | ... | |
1025 | 1009 |
aosprintf("######################################################################\n"); |
1026 | 1010 |
aosprintf("\n"); |
1027 | 1011 |
|
1012 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_6) |
|
1013 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_6_ARGS) |
|
1014 |
AMIROOS_CFG_MAIN_INIT_HOOK_6(AMIROOS_CFG_MAIN_INIT_HOOK_6_ARGS); |
|
1015 |
#else |
|
1016 |
AMIROOS_CFG_MAIN_INIT_HOOK_6(); |
|
1017 |
#endif |
|
1018 |
#endif |
|
1019 |
|
|
1020 |
#if (AMIROOS_CFG_TESTS_ENABLE == true) |
|
1021 |
#if defined(MODULE_INIT_TESTS) |
|
1022 |
MODULE_INIT_TESTS(); |
|
1023 |
#else |
|
1024 |
#warning "MODULE_INIT_TESTS() not defined" |
|
1025 |
#endif |
|
1026 |
#endif |
|
1027 |
|
|
1028 | 1028 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_7) |
1029 | 1029 |
#if defined(AMIROOS_CFG_MAIN_INIT_HOOK_7_ARGS) |
1030 | 1030 |
AMIROOS_CFG_MAIN_INIT_HOOK_7(AMIROOS_CFG_MAIN_INIT_HOOK_7_ARGS); |
Also available in: Unified diff