[FL-3232] FuriHal: fix gpio naming and add explicit pulls for vibro, speaker and ir_tx (#2565)
* FuriHal: fix gpio naming and add explicit pulls for vibro, speaker and ir_tx * Github: workflow event debug print * Github: proper PR head commit SHA extraction in get_env.py
This commit is contained in:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		
		
			
  | 
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user