Mercurial > public > ostc4
comparison BootLoader/Src/base_bootlader.c @ 963:c19c8f17a9f3 Evo_2_23
hard-coded hardwaredata for testing purposes
| author | heinrichsweikamp |
|---|---|
| date | Mon, 13 Jan 2025 14:23:29 +0100 |
| parents | a8c0e6d07b8e |
| children | aef5fb824675 |
comparison
equal
deleted
inserted
replaced
| 960:a8c0e6d07b8e | 963:c19c8f17a9f3 |
|---|---|
| 267 /* 4 bytes with trailing 0 */ | 267 /* 4 bytes with trailing 0 */ |
| 268 .signature = "mh", | 268 .signature = "mh", |
| 269 | 269 |
| 270 .release_year = 25, | 270 .release_year = 25, |
| 271 .release_month = 1, | 271 .release_month = 1, |
| 272 .release_day = 11, | 272 .release_day = 13, |
| 273 .release_sub = 0, | 273 .release_sub = 0, |
| 274 | 274 |
| 275 /* max 48 with trailing 0 */ | 275 /* max 48 with trailing 0 */ |
| 276 .release_info ="tComm with all", | 276 .release_info ="tComm with all", |
| 277 | 277 |
| 280 .magic[1] = FIRMWARE_MAGIC_SECOND, | 280 .magic[1] = FIRMWARE_MAGIC_SECOND, |
| 281 .magic[2] = FIRMWARE_MAGIC_FIRMWARE, /* the magic byte */ | 281 .magic[2] = FIRMWARE_MAGIC_FIRMWARE, /* the magic byte */ |
| 282 .magic[3] = FIRMWARE_MAGIC_END | 282 .magic[3] = FIRMWARE_MAGIC_END |
| 283 }; | 283 }; |
| 284 | 284 |
| 285 #if 0 | 285 const SHardwareData HardwareData __attribute__((section(".HARDWAREDATA_ADDRESS"))) = |
| 286 const SHardwareData HardwareData __attribute__((at(HARDWAREDATA_ADDRESS))) = { | 286 { |
| 287 | 287 |
| 288 // first 52 bytes | 288 // first 52 bytes |
| 289 .primarySerial = 0xFFFF, | 289 .primarySerial = 0xFFFF, |
| 290 .primaryLicence = 0xFF, | 290 .primaryLicence = 0x00, |
| 291 .revision8bit = 0xFF, | 291 .revision8bit = 0x02, |
| 292 .production_year = 0xFF, | 292 .production_year = 0x19, |
| 293 .production_month = 0xFF, | 293 .production_month = 0x01, |
| 294 .production_day = 0xFF, | 294 .production_day = 0x10, |
| 295 .production_bluetooth_name_set = 0xFF, | 295 .production_bluetooth_name_set = 0xFF, |
| 296 | 296 |
| 297 .production_info = { | 297 .production_info = { |
| 298 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | 298 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x4F,0x53,0x54,0x43, |
| 299 0x20,0x35,0x20,0x65,0x6E,0x64,0x2D,0x32,0x30,0x32,0x34, | |
| 300 0x20,0x68,0x61,0x72,0x64,0x77,0x61,0x72,0x65,0x20,0x20, | |
| 301 0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20}, | |
| 302 | |
| 303 /* 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | |
| 299 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | 304 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, |
| 300 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | 305 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, |
| 301 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, | 306 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, |
| 302 | 307 */ |
| 303 // other 12 bytes (64 in total) | 308 // other 12 bytes (64 in total) |
| 304 .secondarySerial = 0xFFFF, | 309 .secondarySerial = 0xFFFF, |
| 305 .secondaryLicence = 0xFF, | 310 .secondaryLicence = 0xFF, |
| 306 .secondaryReason8bit = 0xFF, | 311 .secondaryReason8bit = 0xFF, |
| 307 .secondary_year = 0xFF, | 312 .secondary_year = 0xFF, |
| 308 .secondary_month = 0xFF, | 313 .secondary_month = 0xFF, |
| 309 .secondary_day = 0xFF, | 314 .secondary_day = 0xFF, |
| 310 .secondary_bluetooth_name_set = 0xFF, | 315 .secondary_bluetooth_name_set = 0xFF, |
| 311 .secondary_info = {0xFF,0xFF,0xFF,0xFF} | 316 .secondary_info = {0xFF,0xFF,0xFF,0xFF} |
| 312 }; | 317 }; |
| 313 #endif | 318 |
| 314 | 319 |
| 315 RTC_HandleTypeDef RtcHandle; | 320 RTC_HandleTypeDef RtcHandle; |
| 316 TIM_HandleTypeDef TimHandle; /* used in stm32f4xx_it.c too */ | 321 TIM_HandleTypeDef TimHandle; /* used in stm32f4xx_it.c too */ |
| 317 TIM_HandleTypeDef TimBacklightHandle; /* used in stm32f4xx_it.c too */ | 322 TIM_HandleTypeDef TimBacklightHandle; /* used in stm32f4xx_it.c too */ |
| 318 | 323 |
| 702 MX_UART_Init(); | 707 MX_UART_Init(); |
| 703 MX_Bluetooth_PowerOn(); | 708 MX_Bluetooth_PowerOn(); |
| 704 tComm_init(); | 709 tComm_init(); |
| 705 | 710 |
| 706 tInfo_button_text("exit","","sleep"); | 711 tInfo_button_text("exit","","sleep"); |
| 707 tInfo_newpage("bootloader 250111"); | 712 tInfo_newpage("bootloader 250113"); |
| 708 tInfo_write("start bluetooth"); | 713 tInfo_write("start bluetooth"); |
| 709 tInfo_write(""); | 714 tInfo_write(""); |
| 710 tInfo_write(textVersion); | 715 tInfo_write(textVersion); |
| 711 if(tComm_Set_Bluetooth_Name(0) == 0xFF) | 716 if(tComm_Set_Bluetooth_Name(0) == 0xFF) |
| 712 { | 717 { |
