Re: [RFC]PWM API Update


Liu, Baohong
 

-----Original Message-----
From: Ross, Andrew J
Sent: Monday, September 19, 2016 8:18 AM
To: Liu, Baohong <baohong.liu(a)intel.com>; Tomasz Bursztyka
<tomasz.bursztyka(a)linux.intel.com>; devel(a)lists.zephyrproject.org
Subject: Re: [devel] Re: Re: Re: [RFC]PWM API Update

Liu, Baohong wrote:
get_cycles_per_usec(void); /* we can find better name:) */
Senseless nitpick: this unit choice will hit precision issues.
Many/most PWM implementations in the wild work on clocks in the low MHz,
so this is only going to return a few bits of frequency precision. I'd suggest
cycles_per_sec() (works as long as the clock isn't GHz scale) or
cycle_time_ps() (starts to lose precision above a few GHz, also not everyone
knows what a picosecond is) or something equivalent.
OK.


Andy

Join devel@lists.zephyrproject.org to automatically receive all group messages.