aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-03-08 17:22:49 +0100
committerLars-Dominik Braun <lars@6xq.net>2014-03-08 17:22:49 +0100
commit778e4889e1897c022906c56d0764fe163e24355b (patch)
tree0076e5e0a5a0674507bb7673bf4f3cb1fdd1060d /main.c
parent03dbe661312e9d2e3e379bcd455ddfabc48f95b6 (diff)
downloadhourglass-778e4889e1897c022906c56d0764fe163e24355b.tar.gz
hourglass-778e4889e1897c022906c56d0764fe163e24355b.tar.bz2
hourglass-778e4889e1897c022906c56d0764fe163e24355b.zip
gyroscope: Rename to gyro
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.c b/main.c
index f017109..f04c725 100644
--- a/main.c
+++ b/main.c
@@ -11,7 +11,7 @@
#include "i2c.h"
#include "uart.h"
#include "timer.h"
-#include "gyroscope.h"
+#include "gyro.h"
static void ledInit () {
/* set led1,led2 to output */
@@ -43,25 +43,25 @@ int main () {
ledInit ();
twInit ();
uartInit ();
- gyroscopeInit ();
+ gyroInit ();
set_sleep_mode (SLEEP_MODE_IDLE);
printf ("initialization done\n");
/* global interrupt enable */
sei ();
- gyroscopeStart ();
+ gyroStart ();
//timerStart ();
while (1) {
//sleepwhile (!timerHit ());
//printf ("running for %u seconds\n", seconds);
- sleepwhile (!gyroscopeRead ());
+ sleepwhile (!gyroRead ());
sleepwhile (twr.status == TWST_WAIT);
switch (twr.status) {
case TWST_OK: {
- volatile const int16_t *val = gyroscopeGet ();
+ volatile const int16_t *val = gyroGet ();
printf ("%i/%i/%i\n", val[0], val[1], val[2]);
break;
}