DLTcollab / TA-endpoint

Connect resource constrained endpoints with Tangle-Accelerator
Apache License 2.0
0 stars 2 forks source link

Encapsulated uart implement into HAL #32

Closed splasky closed 4 years ago

splasky commented 4 years ago

These operations should be encapsulated in HAL.

Originally posted by @jserv in https://github.com/DLTcollab/TA-endpoint/pull/30

howjmay commented 4 years ago

@splasky Maybe we could implement the following methods

======IO read/write======

howjmay commented 4 years ago

The original request of this issue is at https://github.com/DLTcollab/TA-endpoint/pull/30#discussion_r388163689

jserv commented 4 years ago

Maybe we could implement the following methods

  • device_t hal_init(device_t dv)
  • void hal_finit(device_t* dv)
  • retcode_t hal_get_id(device_t* dv)
  • retcode_t hal_get_key(device_t* dv)

======IO read/write======

  • retcode_t hal_write(device_t* dv, enum interface)
  • retcode_t hal_read(device_t* dv, enum interface)

Use hal::get_id or hal::write while talking about HAL design.

splasky commented 4 years ago

The UART operators interface has already implemented inside hal, so I close this issue.