We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ecf488a + 3728d8e commit e5e825aCopy full SHA for e5e825a
src/libraries/hal/src/hal_signal.c
@@ -274,10 +274,10 @@ int halg_link(const int use_hal_mutex,
274
// good runtime assertion on 'halcmd show objects'.
275
pin->data_ptr = SHMOFF(&sig->value);
276
277
- if (( sig->readers == 0 ) && ( sig->writers == 0 ) &&
278
- ( sig->bidirs == 0 )) {
+ if (( pin->dir == HAL_OUT ) || ( sig->readers + sig->writers + sig->bidirs == 0 )) {
279
280
// this signal is not linked to any pins
+ // or the newly linked pin is the first OUT pin
281
// copy value from pin's "dummy" field,
282
// making it 'inherit' the value of the first pin
283
// data_addr = hal_shmem_base + sig->data_ptr;
0 commit comments