Merge branch 'fz-dev' into dev

This commit is contained in:
MX 2023-04-10 18:41:22 +03:00
commit 114e8d5b6a
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83
19 changed files with 62 additions and 57 deletions

View file

@ -34,7 +34,7 @@ void AccessorApp::run(void) {
AccessorApp::AccessorApp()
: text_store{0} {
notification = static_cast<NotificationApp*>(furi_record_open(RECORD_NOTIFICATION));
onewire_host = onewire_host_alloc(&ibutton_gpio);
onewire_host = onewire_host_alloc(&gpio_ibutton);
furi_hal_power_enable_otg();
}

View file

@ -33,10 +33,10 @@ It is possible to use other GPIO pin as a 1-Wire data pin. In order to change it
- gpio_ext_pa4
- gpio_ext_pa6
- gpio_ext_pa7
- ibutton_gpio
- gpio_ibutton
*/
#define THERMO_GPIO_PIN (ibutton_gpio)
#define THERMO_GPIO_PIN (gpio_ibutton)
```
Do not forget about the external pull-up resistor as these pins do not have one built-in.

View file

@ -43,10 +43,10 @@
- gpio_ext_pa4
- gpio_ext_pa6
- gpio_ext_pa7
- ibutton_gpio
- gpio_ibutton
*/
#define THERMO_GPIO_PIN (ibutton_gpio)
#define THERMO_GPIO_PIN (gpio_ibutton)
/* Flags which the reader thread responds to */
typedef enum {

View file

@ -45,7 +45,7 @@ static const GPIO GPIOList[] = {
{14, "14 (RX)", &RX_14},
{15, "15 (C1)", &gpio_ext_pc1},
{16, "16 (C0)", &gpio_ext_pc0},
{17, "17 (1W)", &ibutton_gpio}};
{17, "17 (1W)", &gpio_ibutton}};
//Список интерфейсов, которые прикреплены к GPIO (определяется индексом)
//NULL - порт свободен, указатель на интерфейс - порт занят этим интерфейсом

View file

@ -25,7 +25,7 @@ static void onewire_cli_print_usage() {
static void onewire_cli_search(Cli* cli) {
UNUSED(cli);
OneWireHost* onewire = onewire_host_alloc(&ibutton_gpio);
OneWireHost* onewire = onewire_host_alloc(&gpio_ibutton);
uint8_t address[8];
bool done = false;

View file

@ -611,7 +611,7 @@ void subghz_hopper_update(SubGhz* subghz) {
void subghz_speaker_on(SubGhz* subghz) {
if(subghz->txrx->debug_pin_state) {
furi_hal_subghz_set_async_mirror_pin(&ibutton_gpio);
furi_hal_subghz_set_async_mirror_pin(&gpio_ibutton);
}
if(subghz->txrx->speaker_state == SubGhzSpeakerStateEnable) {
@ -656,7 +656,7 @@ void subghz_speaker_mute(SubGhz* subghz) {
void subghz_speaker_unmute(SubGhz* subghz) {
if(subghz->txrx->debug_pin_state) {
furi_hal_subghz_set_async_mirror_pin(&ibutton_gpio);
furi_hal_subghz_set_async_mirror_pin(&gpio_ibutton);
}
if(subghz->txrx->speaker_state == SubGhzSpeakerStateEnable) {
if(furi_hal_speaker_is_mine()) {

View file

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,20.1,,
Version,+,21.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -2161,7 +2161,7 @@ Variable,+,gpio_usart_rx,const GpioPin,
Variable,+,gpio_usart_tx,const GpioPin,
Variable,+,gpio_usb_dm,const GpioPin,
Variable,+,gpio_usb_dp,const GpioPin,
Variable,+,ibutton_gpio,const GpioPin,
Variable,+,gpio_ibutton,const GpioPin,
Variable,+,input_pins,const InputPin[],
Variable,+,input_pins_count,const size_t,
Variable,+,message_blink_set_color_blue,const NotificationMessage,
@ -2309,7 +2309,7 @@ Variable,+,message_red_255,const NotificationMessage,
Variable,+,message_sound_off,const NotificationMessage,
Variable,+,message_vibro_off,const NotificationMessage,
Variable,+,message_vibro_on,const NotificationMessage,
Variable,+,periph_power,const GpioPin,
Variable,+,gpio_periph_power,const GpioPin,
Variable,+,sequence_audiovisual_alert,const NotificationSequence,
Variable,+,sequence_blink_blue_10,const NotificationSequence,
Variable,+,sequence_blink_blue_100,const NotificationSequence,
@ -2364,4 +2364,4 @@ Variable,+,usb_cdc_single,FuriHalUsbInterface,
Variable,+,usb_hid,FuriHalUsbInterface,
Variable,+,usb_hid_u2f,FuriHalUsbInterface,
Variable,+,usbd_devfs,const usbd_driver,
Variable,+,vibro_gpio,const GpioPin,
Variable,+,gpio_vibro,const GpioPin,

1 entry status name type params
2 Version + 20.1 21.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
2161 Variable + gpio_usart_tx const GpioPin
2162 Variable + gpio_usb_dm const GpioPin
2163 Variable + gpio_usb_dp const GpioPin
2164 Variable + ibutton_gpio gpio_ibutton const GpioPin
2165 Variable + input_pins const InputPin[]
2166 Variable + input_pins_count const size_t
2167 Variable + message_blink_set_color_blue const NotificationMessage
2309 Variable + message_sound_off const NotificationMessage
2310 Variable + message_vibro_off const NotificationMessage
2311 Variable + message_vibro_on const NotificationMessage
2312 Variable + periph_power gpio_periph_power const GpioPin
2313 Variable + sequence_audiovisual_alert const NotificationSequence
2314 Variable + sequence_blink_blue_10 const NotificationSequence
2315 Variable + sequence_blink_blue_100 const NotificationSequence
2364 Variable + usb_hid FuriHalUsbInterface
2365 Variable + usb_hid_u2f FuriHalUsbInterface
2366 Variable + usbd_devfs const usbd_driver
2367 Variable + vibro_gpio gpio_vibro const GpioPin

View file

@ -6,8 +6,8 @@
#define TAG "FuriHalResources"
const GpioPin vibro_gpio = {.port = GPIOA, .pin = LL_GPIO_PIN_8};
const GpioPin ibutton_gpio = {.port = GPIOB, .pin = LL_GPIO_PIN_14};
const GpioPin gpio_vibro = {.port = GPIOA, .pin = LL_GPIO_PIN_8};
const GpioPin gpio_ibutton = {.port = GPIOB, .pin = LL_GPIO_PIN_14};
const GpioPin gpio_display_cs = {.port = GPIOC, .pin = LL_GPIO_PIN_11};
const GpioPin gpio_display_rst_n = {.port = GPIOB, .pin = LL_GPIO_PIN_0};
@ -57,7 +57,7 @@ const GpioPin gpio_i2c_power_scl = {.port = GPIOA, .pin = LL_GPIO_PIN_9};
const GpioPin gpio_speaker = {.port = GPIOB, .pin = LL_GPIO_PIN_8};
const GpioPin periph_power = {.port = GPIOA, .pin = LL_GPIO_PIN_3};
const GpioPin gpio_periph_power = {.port = GPIOA, .pin = LL_GPIO_PIN_3};
const GpioPin gpio_usb_dm = {.port = GPIOA, .pin = LL_GPIO_PIN_11};
const GpioPin gpio_usb_dp = {.port = GPIOA, .pin = LL_GPIO_PIN_12};
@ -118,8 +118,8 @@ void furi_hal_resources_init_early() {
furi_hal_resources_init_input_pins(GpioModeInput);
// SD Card stepdown control
furi_hal_gpio_write(&periph_power, 1);
furi_hal_gpio_init(&periph_power, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_periph_power, 1);
furi_hal_gpio_init(&gpio_periph_power, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
// Display pins
furi_hal_gpio_write(&gpio_display_rst_n, 1);
@ -165,6 +165,10 @@ void furi_hal_resources_init() {
// Button pins
furi_hal_resources_init_input_pins(GpioModeInterruptRiseFall);
// Explicit pulls pins
furi_hal_gpio_init(&gpio_speaker, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
furi_hal_gpio_init(&gpio_vibro, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
// Display pins
furi_hal_gpio_init(&gpio_display_rst_n, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_display_rst_n, 0);
@ -176,9 +180,7 @@ void furi_hal_resources_init() {
furi_hal_gpio_init(&gpio_sdcard_cd, GpioModeInput, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_sdcard_cd, 0);
furi_hal_gpio_init(&vibro_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_init(&gpio_ibutton, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
NVIC_SetPriority(EXTI0_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 5, 0));
NVIC_EnableIRQ(EXTI0_IRQn);
@ -222,7 +224,7 @@ int32_t furi_hal_resources_get_ext_pin_number(const GpioPin* gpio) {
return 15;
else if(gpio == &gpio_ext_pc0)
return 16;
else if(gpio == &ibutton_gpio)
else if(gpio == &gpio_ibutton)
return 17;
else
return -1;

View file

@ -50,8 +50,8 @@ extern const size_t input_pins_count;
extern const GpioPinRecord gpio_pins[];
extern const size_t gpio_pins_count;
extern const GpioPin vibro_gpio;
extern const GpioPin ibutton_gpio;
extern const GpioPin gpio_vibro;
extern const GpioPin gpio_ibutton;
extern const GpioPin gpio_display_cs;
extern const GpioPin gpio_display_rst_n;
@ -100,7 +100,7 @@ extern const GpioPin gpio_i2c_power_scl;
extern const GpioPin gpio_speaker;
extern const GpioPin periph_power;
extern const GpioPin gpio_periph_power;
extern const GpioPin gpio_usb_dm;
extern const GpioPin gpio_usb_dp;

View file

@ -1,5 +1,5 @@
entry,status,name,type,params
Version,+,20.1,,
Version,+,21.0,,
Header,+,applications/services/bt/bt_service/bt.h,,
Header,+,applications/services/cli/cli.h,,
Header,+,applications/services/cli/cli_vcp.h,,
@ -4764,7 +4764,7 @@ Variable,+,gpio_usart_rx,const GpioPin,
Variable,+,gpio_usart_tx,const GpioPin,
Variable,+,gpio_usb_dm,const GpioPin,
Variable,+,gpio_usb_dp,const GpioPin,
Variable,+,ibutton_gpio,const GpioPin,
Variable,+,gpio_ibutton,const GpioPin,
Variable,+,input_pins,const InputPin[],
Variable,+,input_pins_count,const size_t,
Variable,+,lfrfid_protocols,const ProtocolBase*[],
@ -4913,7 +4913,7 @@ Variable,+,message_red_255,const NotificationMessage,
Variable,+,message_sound_off,const NotificationMessage,
Variable,+,message_vibro_off,const NotificationMessage,
Variable,+,message_vibro_on,const NotificationMessage,
Variable,+,periph_power,const GpioPin,
Variable,+,gpio_periph_power,const GpioPin,
Variable,+,sequence_audiovisual_alert,const NotificationSequence,
Variable,+,sequence_blink_blue_10,const NotificationSequence,
Variable,+,sequence_blink_blue_100,const NotificationSequence,
@ -6920,4 +6920,4 @@ Variable,+,usb_cdc_single,FuriHalUsbInterface,
Variable,+,usb_hid,FuriHalUsbInterface,
Variable,+,usb_hid_u2f,FuriHalUsbInterface,
Variable,+,usbd_devfs,const usbd_driver,
Variable,+,vibro_gpio,const GpioPin,
Variable,+,gpio_vibro,const GpioPin,

1 entry status name type params
2 Version + 20.1 21.0
3 Header + applications/services/bt/bt_service/bt.h
4 Header + applications/services/cli/cli.h
5 Header + applications/services/cli/cli_vcp.h
4764 Variable + gpio_usart_tx const GpioPin
4765 Variable + gpio_usb_dm const GpioPin
4766 Variable + gpio_usb_dp const GpioPin
4767 Variable + ibutton_gpio gpio_ibutton const GpioPin
4768 Variable + input_pins const InputPin[]
4769 Variable + input_pins_count const size_t
4770 Variable + lfrfid_protocols const ProtocolBase*[]
4913 Variable + message_sound_off const NotificationMessage
4914 Variable + message_vibro_off const NotificationMessage
4915 Variable + message_vibro_on const NotificationMessage
4916 Variable + periph_power gpio_periph_power const GpioPin
4917 Variable + sequence_audiovisual_alert const NotificationSequence
4918 Variable + sequence_blink_blue_10 const NotificationSequence
4919 Variable + sequence_blink_blue_100 const NotificationSequence
6920 Variable + usb_hid FuriHalUsbInterface
6921 Variable + usb_hid_u2f FuriHalUsbInterface
6922 Variable + usbd_devfs const usbd_driver
6923 Variable + vibro_gpio gpio_vibro const GpioPin

View file

@ -93,15 +93,15 @@ void furi_hal_ibutton_emulate_stop() {
}
void furi_hal_ibutton_pin_configure() {
furi_hal_gpio_write(&ibutton_gpio, true);
furi_hal_gpio_init(&ibutton_gpio, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_ibutton, true);
furi_hal_gpio_init(&gpio_ibutton, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
}
void furi_hal_ibutton_pin_reset() {
furi_hal_gpio_write(&ibutton_gpio, true);
furi_hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_ibutton, true);
furi_hal_gpio_init(&gpio_ibutton, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
}
void furi_hal_ibutton_pin_write(const bool state) {
furi_hal_gpio_write(&ibutton_gpio, state);
furi_hal_gpio_write(&gpio_ibutton, state);
}

View file

@ -570,9 +570,9 @@ static void furi_hal_infrared_async_tx_free_resources(void) {
(furi_hal_infrared_state == InfraredStateAsyncTxStopped));
if(infrared_external_output) {
furi_hal_gpio_init(&gpio_ext_pa7, GpioModeOutputOpenDrain, GpioPullDown, GpioSpeedLow);
furi_hal_gpio_init(&gpio_ext_pa7, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
} else {
furi_hal_gpio_init(&gpio_infrared_tx, GpioModeOutputOpenDrain, GpioPullDown, GpioSpeedLow);
furi_hal_gpio_init(&gpio_infrared_tx, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
}
furi_hal_interrupt_set_isr(IR_DMA_CH1_IRQ, NULL, NULL);
furi_hal_interrupt_set_isr(IR_DMA_CH2_IRQ, NULL, NULL);

View file

@ -440,11 +440,11 @@ float furi_hal_power_get_usb_voltage() {
}
void furi_hal_power_enable_external_3_3v() {
furi_hal_gpio_write(&periph_power, 1);
furi_hal_gpio_write(&gpio_periph_power, 1);
}
void furi_hal_power_disable_external_3_3v() {
furi_hal_gpio_write(&periph_power, 0);
furi_hal_gpio_write(&gpio_periph_power, 0);
}
void furi_hal_power_suppress_charge_enter() {

View file

@ -6,8 +6,8 @@
#define TAG "FuriHalResources"
const GpioPin vibro_gpio = {.port = VIBRO_GPIO_Port, .pin = VIBRO_Pin};
const GpioPin ibutton_gpio = {.port = iBTN_GPIO_Port, .pin = iBTN_Pin};
const GpioPin gpio_vibro = {.port = VIBRO_GPIO_Port, .pin = VIBRO_Pin};
const GpioPin gpio_ibutton = {.port = iBTN_GPIO_Port, .pin = iBTN_Pin};
const GpioPin gpio_cc1101_g0 = {.port = CC1101_G0_GPIO_Port, .pin = CC1101_G0_Pin};
const GpioPin gpio_cc1101_g0_ext = {.port = GPIOB, .pin = LL_GPIO_PIN_2};
@ -64,7 +64,7 @@ const GpioPin gpio_i2c_power_scl = {.port = GPIOA, .pin = LL_GPIO_PIN_9};
const GpioPin gpio_speaker = {.port = GPIOB, .pin = LL_GPIO_PIN_8};
const GpioPin periph_power = {.port = GPIOA, .pin = LL_GPIO_PIN_3};
const GpioPin gpio_periph_power = {.port = GPIOA, .pin = LL_GPIO_PIN_3};
const GpioPin gpio_usb_dm = {.port = GPIOA, .pin = LL_GPIO_PIN_11};
const GpioPin gpio_usb_dp = {.port = GPIOA, .pin = LL_GPIO_PIN_12};
@ -111,8 +111,8 @@ void furi_hal_resources_init_early() {
furi_hal_resources_init_input_pins(GpioModeInput);
// SD Card stepdown control
furi_hal_gpio_write(&periph_power, 1);
furi_hal_gpio_init(&periph_power, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_periph_power, 1);
furi_hal_gpio_init(&gpio_periph_power, GpioModeOutputOpenDrain, GpioPullNo, GpioSpeedLow);
// Display pins
furi_hal_gpio_write(&gpio_display_rst_n, 1);
@ -158,6 +158,11 @@ void furi_hal_resources_init() {
// Button pins
furi_hal_resources_init_input_pins(GpioModeInterruptRiseFall);
// Explicit pulls pins
furi_hal_gpio_init(&gpio_infrared_tx, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
furi_hal_gpio_init(&gpio_speaker, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
furi_hal_gpio_init(&gpio_vibro, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
// Display pins
furi_hal_gpio_init(&gpio_display_rst_n, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_display_rst_n, 0);
@ -169,9 +174,7 @@ void furi_hal_resources_init() {
furi_hal_gpio_init(&gpio_sdcard_cd, GpioModeInput, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_sdcard_cd, 0);
furi_hal_gpio_init(&vibro_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_init(&ibutton_gpio, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_init(&gpio_ibutton, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_init(&gpio_nfc_irq_rfid_pull, GpioModeInterruptRise, GpioPullNo, GpioSpeedLow);
@ -218,7 +221,7 @@ int32_t furi_hal_resources_get_ext_pin_number(const GpioPin* gpio) {
return 15;
else if(gpio == &gpio_ext_pc0)
return 16;
else if(gpio == &ibutton_gpio)
else if(gpio == &gpio_ibutton)
return 17;
else
return -1;

View file

@ -50,8 +50,8 @@ extern const size_t input_pins_count;
extern const GpioPinRecord gpio_pins[];
extern const size_t gpio_pins_count;
extern const GpioPin vibro_gpio;
extern const GpioPin ibutton_gpio;
extern const GpioPin gpio_vibro;
extern const GpioPin gpio_ibutton;
extern const GpioPin gpio_cc1101_g0;
extern const GpioPin gpio_cc1101_g0_ext;
@ -107,7 +107,7 @@ extern const GpioPin gpio_i2c_power_scl;
extern const GpioPin gpio_speaker;
extern const GpioPin periph_power;
extern const GpioPin gpio_periph_power;
extern const GpioPin gpio_usb_dm;
extern const GpioPin gpio_usb_dp;

View file

@ -52,7 +52,7 @@ void furi_hal_speaker_release() {
furi_check(furi_hal_speaker_is_mine());
furi_hal_speaker_stop();
furi_hal_gpio_init(&gpio_speaker, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_init(&gpio_speaker, GpioModeAnalog, GpioPullDown, GpioSpeedLow);
furi_hal_power_insomnia_exit();
furi_check(furi_mutex_release(furi_hal_speaker_mutex) == FuriStatusOk);

View file

@ -4,11 +4,11 @@
#define TAG "FuriHalVibro"
void furi_hal_vibro_init() {
furi_hal_gpio_init(&vibro_gpio, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&vibro_gpio, false);
furi_hal_gpio_init(&gpio_vibro, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
furi_hal_gpio_write(&gpio_vibro, false);
FURI_LOG_I(TAG, "Init OK");
}
void furi_hal_vibro_on(bool value) {
furi_hal_gpio_write(&vibro_gpio, value);
furi_hal_gpio_write(&gpio_vibro, value);
}

View file

@ -14,8 +14,8 @@ typedef struct {
static iButtonProtocolGroupDallas* ibutton_protocol_group_dallas_alloc() {
iButtonProtocolGroupDallas* group = malloc(sizeof(iButtonProtocolGroupDallas));
group->host = onewire_host_alloc(&ibutton_gpio);
group->bus = onewire_slave_alloc(&ibutton_gpio);
group->host = onewire_host_alloc(&gpio_ibutton);
group->bus = onewire_slave_alloc(&gpio_ibutton);
return group;
}

View file

@ -32,7 +32,7 @@ def parse_args():
def get_commit_json(event):
context = ssl._create_unverified_context()
commit_url = event["pull_request"]["base"]["repo"]["commits_url"].replace(
"{/sha}", f"/{event['after']}"
"{/sha}", f"/{event['pull_request']['head']['sha']}"
)
with urllib.request.urlopen(commit_url, context=context) as commit_file:
commit_json = json.loads(commit_file.read().decode("utf-8"))