Merge remote-tracking branch 'OFW/dev' into dev

This commit is contained in:
MX
2024-10-15 00:08:47 +03:00
parent 2f102e61a9
commit 4b9b1769f7
54 changed files with 1357 additions and 213 deletions

View File

@@ -354,3 +354,19 @@ int32_t furi_hal_resources_get_ext_pin_number(const GpioPin* gpio) {
}
return -1;
}
const GpioPinRecord* furi_hal_resources_pin_by_name(const char* name) {
for(size_t i = 0; i < gpio_pins_count; i++) {
const GpioPinRecord* record = &gpio_pins[i];
if(strcasecmp(name, record->name) == 0) return record;
}
return NULL;
}
const GpioPinRecord* furi_hal_resources_pin_by_number(uint8_t number) {
for(size_t i = 0; i < gpio_pins_count; i++) {
const GpioPinRecord* record = &gpio_pins[i];
if(record->number == number) return record;
}
return NULL;
}