Statistics
| Branch: | Tag: | Revision:

mongoose / examples / CC3200 / bm222.h @ eaef5bd1

History | View | Annotate | Download (598 Bytes)

1
/*
2
 * Copyright (c) 2014-2016 Cesanta Software Limited
3
 * All rights reserved
4
 */
5

    
6
#ifndef CS_MONGOOSE_EXAMPLES_CC3200_BM222_H_
7
#define CS_MONGOOSE_EXAMPLES_CC3200_BM222_H_
8

    
9
#include <inttypes.h>
10
#include <stdbool.h>
11

    
12
#define BM222_NUM_SAMPLES 64
13
struct bm222_ctx {
14
  uint8_t addr;
15
  struct bm222_sample {
16
    double ts;
17
    int8_t x;
18
    int8_t y;
19
    int8_t z;
20
  } data[BM222_NUM_SAMPLES];
21
  int last_index;
22
};
23

    
24
struct bm222_ctx *bm222_init(uint8_t addr);
25
bool bm222_fifo_init(struct bm222_ctx *ctx);
26
bool bm222_get_data(struct bm222_ctx *ctx);
27

    
28
#endif /* CS_MONGOOSE_EXAMPLES_CC3200_BM222_H_ */