Skip to main content
This topic has been closed for replies.

5 replies

Romain DIELEMAN
ST Employee
Aug 6, 2020 8:21 AM UTC

Hi,

In the backend communication article in the documentation you can download projects on different boards using external buttons.

/Romain

TomJJJ
TomJJJAuthor
Associate II
Aug 6, 2020 8:39 AM UTC

Thank you very much

MM..1
Super User
Aug 6, 2020 8:54 AM UTC

Add next key ...

if (HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_13) != GPIO_PIN_RESET)

{

key = 1;

return true;

}

if (HAL_GPIO_ReadPin(GPIOXX, GPIO_PIN_XX) != GPIO_PIN_RESET)

{

key = 2;

return true;

}

and to project

"PhysicalButtons": [

{

"Key": 1,

"Name": "BTN_USER"

},

{

"Key": 2,

"Name": "BTN_USERXX"

}

],

...

MM..1
Super User
Aug 6, 2020 9:02 AM UTC

Too you can aliasing gpio to keyboard keys ... and simply in model tick use

if (HAL_GPIO_ReadPin(SW_PWR_GPIO_Port, SW_PWR_Pin) == GPIO_PIN_RESET && filter == false )

 {

  filter = true;

  static_cast<FrontendApplication*>(Application::getInstance())->handleKeyEvent(85);

 }

85 is defined as key "U" in trigger designer...

TomJJJ
TomJJJAuthor
Associate II
Aug 6, 2020 12:38 PM UTC

Thank you everyone.

i solved my issue