Switch timer syscalls that can't fail to use syscalls::raw - otherwise returning a 32-bit value with the high bit set gets interpreted as an error code by libtock-rs

Change-Id: Id4fe3c1c91d6655a0e6686c5204756b54579a067
diff --git a/src/timer.rs b/src/timer.rs
index 946c6e5..0ab76cc 100644
--- a/src/timer.rs
+++ b/src/timer.rs
@@ -53,14 +53,14 @@
             syscalls::command(DRIVER_NUMBER, command_nr::IS_DRIVER_AVAILABLE, 0, 0)?;
 
         let clock_frequency =
-            syscalls::command(DRIVER_NUMBER, command_nr::GET_CLOCK_FREQUENCY, 0, 0)?;
+            unsafe { syscalls::raw::command(DRIVER_NUMBER, command_nr::GET_CLOCK_FREQUENCY, 0, 0) };
 
         if clock_frequency == 0 {
             return Err(OtherError::TimerDriverErroneousClockFrequency.into());
         }
 
         let clock_frequency = ClockFrequency {
-            hz: clock_frequency,
+            hz: clock_frequency as usize,
         };
 
         let subscription = syscalls::subscribe::<TimerEventConsumer, _>(
@@ -95,8 +95,9 @@
 
     pub fn get_current_clock(&self) -> TockResult<ClockValue> {
         Ok(ClockValue {
-            num_ticks: syscalls::command(DRIVER_NUMBER, command_nr::GET_CLOCK_VALUE, 0, 0)?
-                as isize,
+            num_ticks: unsafe {
+                syscalls::raw::command(DRIVER_NUMBER, command_nr::GET_CLOCK_VALUE, 0, 0)
+            },
             clock_frequency: self.clock_frequency,
         })
     }
@@ -130,9 +131,13 @@
         };
         let alarm_instant = now.num_ticks() as usize + ticks;
 
-        let alarm_id = syscalls::command(DRIVER_NUMBER, command_nr::SET_ALARM, alarm_instant, 0)?;
+        let alarm_id = unsafe {
+            syscalls::raw::command(DRIVER_NUMBER, command_nr::SET_ALARM, alarm_instant, 0)
+        };
 
-        Ok(Alarm { alarm_id })
+        Ok(Alarm {
+            alarm_id: alarm_id as usize,
+        })
     }
 }
 
@@ -492,7 +497,7 @@
 }
 
 fn get_current_ticks() -> TockResult<usize> {
-    syscalls::command(DRIVER_NUMBER, command_nr::GET_CLOCK_VALUE, 0, 0).map_err(|err| err.into())
+    unsafe { Ok(syscalls::raw::command(DRIVER_NUMBER, command_nr::GET_CLOCK_VALUE, 0, 0) as usize) }
 }
 fn set_alarm_at(instant: usize) -> TockResult<()> {
     syscalls::command(DRIVER_NUMBER, command_nr::SET_ALARM, instant, 0)
@@ -511,8 +516,9 @@
 }
 
 fn get_clock_frequency() -> TockResult<usize> {
-    syscalls::command(DRIVER_NUMBER, command_nr::GET_CLOCK_FREQUENCY, 0, 0)
-        .map_err(|err| err.into())
+    unsafe {
+        Ok(syscalls::raw::command(DRIVER_NUMBER, command_nr::GET_CLOCK_FREQUENCY, 0, 0) as usize)
+    }
 }
 
 fn is_over(timer: ActiveTimer, now: u32) -> bool {