mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 17:33:37 +08:00
boards/sky-drones: update to extended hw_ver_rev format
This commit is contained in:
@@ -173,9 +173,7 @@
|
|||||||
#define GPIO_HW_VER_REV_DRIVE /* PG0 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN0)
|
#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_REV_SENSE /* PF5 */ ADC3_GPIO(15)
|
||||||
#define GPIO_HW_VER_SENSE /* PF4 */ ADC3_GPIO(14)
|
#define GPIO_HW_VER_SENSE /* PF4 */ ADC3_GPIO(14)
|
||||||
#define HW_INFO_INIT {'V','5','X','x', 'x',0}
|
#define HW_INFO_INIT "V5X%04x%04x"
|
||||||
#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 */
|
|
||||||
|
|
||||||
/* HEATER
|
/* HEATER
|
||||||
* PWM in future
|
* PWM in future
|
||||||
|
|||||||
@@ -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;
|
static px4_hw_mft_list_entry boards_manifest = px4_hw_mft_list_uninitialized;
|
||||||
|
|
||||||
if (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();
|
ver_rev |= board_get_hw_revision();
|
||||||
|
|
||||||
for (unsigned i = 0; i < arraySize(mft_lists); i++) {
|
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) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,9 @@ static const px4_mft_entry_s mtd_mft = {
|
|||||||
|
|
||||||
static const px4_mft_s mft = {
|
static const px4_mft_s mft = {
|
||||||
.nmft = 1,
|
.nmft = 1,
|
||||||
.mfts = &mtd_mft
|
.mfts = {
|
||||||
|
&mtd_mft
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const px4_mft_s *board_get_manifest(void)
|
const px4_mft_s *board_get_manifest(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user