altos/lpc: Add casts to reduce -Wconversion warnings
[fw/altos] / src / lpc / ao_beep_lpc.c
index eb9132b870c1cd4f9916d6fef409d6b8ce093e86..13aa337445e9f74b0c90e63c68f47f60c5ee95d7 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,7 +24,7 @@ ao_beep(uint8_t beep)
        if (beep == 0) {
                lpc_ct32b1.tcr = ((0 << LPC_CT32B_TCR_CEN) |
                                  (1 << LPC_CT32B_TCR_CRST));
-               lpc_scb.sysahbclkctrl &= ~(1 << LPC_SCB_SYSAHBCLKCTRL_CT32B1);
+               lpc_scb.sysahbclkctrl &= ~(1UL << LPC_SCB_SYSAHBCLKCTRL_CT32B1);
        } else {
                lpc_scb.sysahbclkctrl |= (1 << LPC_SCB_SYSAHBCLKCTRL_CT32B1);
 
@@ -58,7 +59,7 @@ ao_beep(uint8_t beep)
 }
 
 void
-ao_beep_for(uint8_t beep, uint16_t ticks) __reentrant
+ao_beep_for(uint8_t beep, AO_TICK_TYPE ticks) 
 {
        ao_beep(beep);
        ao_delay(ticks);