tinyusb
acc.h
1 /*****************************************************************************
2  *
3  * Copyright(C) 2011, Embedded Artists AB
4  * All rights reserved.
5  *
6  ******************************************************************************
7  * Software that is described herein is for illustrative purposes only
8  * which provides customers with programming information regarding the
9  * products. This software is supplied "AS IS" without any warranties.
10  * Embedded Artists AB assumes no responsibility or liability for the
11  * use of the software, conveys no license or title under any patent,
12  * copyright, or mask work right to the product. Embedded Artists AB
13  * reserves the right to make changes in the software without
14  * notification. Embedded Artists AB also make no representation or
15  * warranty that such application will be suitable for the specified
16  * use without further testing or modification.
17  *****************************************************************************/
18 #ifndef __ACC_H
19 #define __ACC_H
20 
21 
22 typedef enum
23 {
24  ACC_MODE_STANDBY,
25  ACC_MODE_MEASURE,
26  ACC_MODE_LEVEL, /* level detection */
27  ACC_MODE_PULSE, /* pulse detection */
28 } acc_mode_t;
29 
30 typedef enum
31 {
32  ACC_RANGE_8G,
33  ACC_RANGE_2G,
34  ACC_RANGE_4G,
35 } acc_range_t;
36 
37 
38 void acc_init (void);
39 
40 void acc_read (int8_t *x, int8_t *y, int8_t *z);
41 void acc_setRange(acc_range_t range);
42 void acc_setMode(acc_mode_t mode);
43 
44 
45 
46 #endif /* end __LIGHT_H */
47 /****************************************************************************
48 ** End Of File
49 *****************************************************************************/