Revision f7d2c786 Target/Modules/LightRing_1-0/Boot/main.c
Target/Modules/LightRing_1-0/Boot/main.c | ||
---|---|---|
75 | 75 |
|
76 | 76 |
const blCallbackTable_t cbtable __attribute__ ((section ("_callback_table"))) = { |
77 | 77 |
.magicNumber = BL_MAGIC_NUMBER, |
78 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Release, BL_VERSION_MAJOR, BL_VERSION_MINOR, 2},
|
|
78 |
.vBootloader = {BL_VERSION_ID_AMiRoBLT_Beta, BL_VERSION_MAJOR, BL_VERSION_MINOR, 0},
|
|
79 | 79 |
.vSSSP = {BL_VERSION_ID_SSSP, BL_SSSP_VERSION_MAJOR, BL_SSSP_VERSION_MINOR, 0}, |
80 | 80 |
.vCompiler = {BL_VERSION_ID_GCC, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__}, // currently only GCC is supported |
81 | 81 |
.cbShutdownHibernate = blCallbackShutdownHibernate, |
... | ... | |
103 | 103 |
/* initialize the microcontroller */ |
104 | 104 |
Init(); |
105 | 105 |
|
106 |
/* activate some required cocks */ |
|
106 |
/* activate some required clocks */
|
|
107 | 107 |
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); |
108 | 108 |
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD, ENABLE); |
109 | 109 |
|
... | ... | |
133 | 133 |
|
134 | 134 |
setLed(BLT_FALSE); |
135 | 135 |
|
136 |
/* hanlde different wakeup/reset reasons */
|
|
136 |
/* handle different wakeup/reset reasons */
|
|
137 | 137 |
ErrorStatus status = ERROR; |
138 | 138 |
if (backup_reg.wakeup_pri_reason & BL_WAKEUP_PRI_RSN_PINRST) { |
139 | 139 |
/* system was woken via NRST pin */ |
... | ... | |
533 | 533 |
*/ |
534 | 534 |
|
535 | 535 |
return; |
536 |
} |
|
536 |
} /*** end of shutdownAndRestart***/
|
|
537 | 537 |
|
538 | 538 |
/* |
539 | 539 |
* Configures some GPIO pins as inputs for safety reasons. |
Also available in: Unified diff