Skip to content

Commit

Permalink
* Provide a non-empty implementation only if devices are
Browse files Browse the repository at this point in the history
  • Loading branch information
yoogx committed May 8, 2018
1 parent 5ea1cc1 commit 0b26528
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/drivers/po_hi_driver_serial_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

int __po_hi_c_driver_serial_common_get_speed (const __po_hi_device_id id)
{

#if __PO_HI_NB_DEVICES > 0
__po_hi_c_serial_conf_t* serialconf;

serialconf = (__po_hi_c_serial_conf_t*)__po_hi_get_device_configuration (id);

switch (serialconf->speed)
Expand Down Expand Up @@ -50,6 +52,7 @@ int __po_hi_c_driver_serial_common_get_speed (const __po_hi_device_id id)
return __PO_HI_DRIVER_SERIAL_COMMON_SPEED_UNKNWON;
break;
}
#endif

return __PO_HI_DRIVER_SERIAL_COMMON_SPEED_DEFAULT;
}

0 comments on commit 0b26528

Please sign in to comment.