mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-10 20:51:37 +08:00
wip: squashed patch
This commit is contained in:
@@ -173,10 +173,8 @@
|
||||
#define GPIO_HW_VER_REV_DRIVE /* PG0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN0)
|
||||
#define GPIO_HW_REV_SENSE /* PF5 */ ADC3_GPIO(15)
|
||||
#define GPIO_HW_VER_SENSE /* PF4 */ ADC3_GPIO(14)
|
||||
#define HW_INFO_INIT {'V','5','X','x', 'x',0}
|
||||
#define HW_INFO_INIT_VER 3 /* Offset in above string of the VER */
|
||||
#define HW_INFO_INIT_REV 4 /* Offset in above string of the REV */
|
||||
|
||||
#define HW_INFO_INIT_PREFIX "SDSA"
|
||||
#define SDSA0501 HW_VER_REV(0x05,0x01)
|
||||
/* HEATER
|
||||
* PWM in future
|
||||
*/
|
||||
|
||||
@@ -88,7 +88,7 @@ static const px4_hw_mft_item_t hw_mft_list_v0501[] = {
|
||||
|
||||
|
||||
static px4_hw_mft_list_entry_t mft_lists[] = {
|
||||
{0x0501, hw_mft_list_v0501, arraySize(hw_mft_list_v0501)},
|
||||
{SDSA0501, hw_mft_list_v0501, arraySize(hw_mft_list_v0501)},
|
||||
};
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
|
||||
static px4_hw_mft_list_entry boards_manifest = px4_hw_mft_list_uninitialized;
|
||||
|
||||
if (boards_manifest == px4_hw_mft_list_uninitialized) {
|
||||
uint32_t ver_rev = board_get_hw_version() << 8;
|
||||
uint32_t ver_rev = board_get_hw_version() << 16;
|
||||
ver_rev |= board_get_hw_revision();
|
||||
|
||||
for (unsigned i = 0; i < arraySize(mft_lists); i++) {
|
||||
@@ -123,7 +123,7 @@ __EXPORT px4_hw_mft_item board_query_manifest(px4_hw_mft_item_id_t id)
|
||||
}
|
||||
|
||||
if (boards_manifest == px4_hw_mft_list_uninitialized) {
|
||||
syslog(LOG_ERR, "[boot] Board %4" PRIx32 " is not supported!\n", ver_rev);
|
||||
syslog(LOG_ERR, "[boot] Board %08" PRIx32 " is not supported!\n", ver_rev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ static const px4_mtd_entry_t base_eeprom = {
|
||||
.npart = 2,
|
||||
.partd = {
|
||||
{
|
||||
.type = MTD_MFT,
|
||||
.path = "/fs/mtd_mft",
|
||||
.type = MTD_MFT_VER,
|
||||
.path = "/fs/mtd_mft_ver",
|
||||
.nblocks = 248
|
||||
},
|
||||
{
|
||||
@@ -95,7 +95,9 @@ static const px4_mft_entry_s mtd_mft = {
|
||||
|
||||
static const px4_mft_s mft = {
|
||||
.nmft = 1,
|
||||
.mfts = &mtd_mft
|
||||
.mfts = {
|
||||
&mtd_mft
|
||||
}
|
||||
};
|
||||
|
||||
const px4_mft_s *board_get_manifest(void)
|
||||
|
||||
Reference in New Issue
Block a user