diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-12-17 13:43:17 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-12-19 00:12:28 +0000 |
commit | 6ab8e91658f1efc894b648cc0748af8d804915e4 (patch) | |
tree | c33da7914793452ecb37084e505230171d4eff9e /common/lightbar.c | |
parent | e5935f17d1798a1f19c6003e57f140446774484f (diff) | |
download | chrome-ec-6ab8e91658f1efc894b648cc0748af8d804915e4.tar.gz |
cleanup: Remove checkpatch warnings
This make minor syntactic changes and renames some camel-cased symbols
to keep checkpatch from complaining. The goal is to reduce the
temptation to use 'repo upload --no-verify'.
This is a big furball of find/replace, but no functional changes.
BUG=chromium:322144
BRANCH=none
TEST=build all boards; pass unit tests
Change-Id: I0269b7dd95836ef9a6e33f88c003ab0f24f842a0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/180495
Diffstat (limited to 'common/lightbar.c')
-rw-r--r-- | common/lightbar.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/lightbar.c b/common/lightbar.c index 847da1b003..4f0f799957 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -464,14 +464,14 @@ static inline float cycle_010(uint8_t i) /* This function provides a smooth oscillation between -0.5 and +0.5. * Zero starts at 0x00. */ -static inline float cycle_0P0N0(uint16_t i) +static inline float cycle_0p0n0(uint16_t i) { uint8_t i8 = i & 0x00FF; return cycle_010(i8+64) - 0.5f; } /* This function provides a pulsing oscillation between -0.5 and +0.5. */ -static inline float cycle_NPN(uint16_t i) +static inline float cycle_npn(uint16_t i) { if ((i / 256) % 4) return -0.5f; @@ -562,7 +562,7 @@ static uint32_t sequence_S3S0(void) } /* Initial conditions */ - st.w0 = -256; /* start cycle_NPN() quietly */ + st.w0 = -256; /* start cycle_npn() quietly */ st.ramp = 0; /* Ready for S0 */ @@ -612,10 +612,10 @@ static uint32_t sequence_S0(void) for (i = 0; i < NUM_LEDS; i++) { if (st.p.new_s0) { w = st.w0 - i * w_ofs * f_ramp; - f = base_s0 + osc_s0 * cycle_NPN(w); + f = base_s0 + osc_s0 * cycle_npn(w); } else { w = st.w0 - i * w_ofs * f_ramp; - f = base_s0 + osc_s0 * cycle_0P0N0(w) * f_ramp; + f = base_s0 + osc_s0 * cycle_0p0n0(w) * f_ramp; } r = st.p.color[ci].r * f; g = st.p.color[ci].g * f; |