xmos / fwk_io

I/O Framework
Other
2 stars 11 forks source link

I2S restart documentation easily misunderstood #33

Closed xhuw closed 2 years ago

xhuw commented 2 years ago

small one, Just been using i2s from this library. Found the documentation for i2s_restart_t unclear

https://github.com/xmos/fwk_io/blob/290c3ec127af4a4cdfdea482d168c16a5b6f4bc7/modules/i2s/api/i2s.h#L61

I assumed NO_RESTART meant it wouldn't send more samples, the opposite of starting is stopping. If the comment made it clear that this was the choice if you want to continue sending samples then I think I wouldn't have got stuck (I did read the comments)

xmos-jmccarthy commented 2 years ago

This was direct carry over from lib_i2s https://github.com/xmos/lib_i2s/blob/0df82ce1b72633f8cd59dff0c30ffb14cfbe5377/lib_i2s/api/i2s.h#L53-L57

The wording is a bit strange as it is from the perspective of the service thread, but the goal was to be consistent with prior libraries where possible.