Home | History | Annotate | Download | only in mllite
      1 /*
      2  $License:
      3    Copyright 2011 InvenSense, Inc.
      4 
      5  Licensed under the Apache License, Version 2.0 (the "License");
      6  you may not use this file except in compliance with the License.
      7  You may obtain a copy of the License at
      8 
      9  http://www.apache.org/licenses/LICENSE-2.0
     10 
     11  Unless required by applicable law or agreed to in writing, software
     12  distributed under the License is distributed on an "AS IS" BASIS,
     13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  See the License for the specific language governing permissions and
     15  limitations under the License.
     16   $
     17  */
     18 #ifndef INVENSENSE_INV_FIFO_HW_H__
     19 #define INVENSENSE_INV_FIFO_HW_H__
     20 
     21 #include "mpu.h"
     22 #include "mltypes.h"
     23 #include "mlinclude.h"
     24 #ifdef INV_INCLUDE_LEGACY_HEADERS
     25 #include "mlFIFOHW_legacy.h"
     26 #endif
     27 
     28 #ifdef __cplusplus
     29 extern "C" {
     30 #endif
     31 
     32     // This is the maximum amount of FIFO data we would read in one packet
     33 #define MAX_FIFO_LENGTH             (256)
     34     // This is the hardware size of the FIFO
     35 #define FIFO_FOOTER_SIZE            (2)
     36 
     37     uint_fast16_t inv_get_fifo(uint_fast16_t length, unsigned char *buffer);
     38     inv_error_t inv_get_fifo_status(void);
     39     inv_error_t inv_get_fifo_length(uint_fast16_t * len);
     40     short inv_get_fifo_count(void);
     41     inv_error_t inv_reset_fifo(void);
     42     void inv_init_fifo_hardare();
     43     inv_error_t inv_read_fifo(unsigned char *data, uint_fast16_t len);
     44 
     45 #ifdef __cplusplus
     46 }
     47 #endif
     48 #endif                          // INVENSENSE_INV_FIFO_HW_H__
     49