/**************************************************************************** * * Copyright (c) 2005 Dave Hylands * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * ****************************************************************************/ #if !defined( TACH_H ) #define TACH_H // ---- Include Files ------------------------------------------------------- #include #include #include "CBUF.h" // ---- Constants and Types ------------------------------------------------- #define TACH_NUM_ENTRIES 16 // Must be power of 2 typedef struct { uint8_t m_getIdx; uint8_t m_putIdx; uint32_t m_entry[ TACH_NUM_ENTRIES ]; } TACH_Buffer_t; #define TACH_gBuffer_SIZE TACH_NUM_ENTRIES // ---- Variable Externs ---------------------------------------------------- extern volatile TACH_Buffer_t TACH_gBuffer; // ---- Function Prototypes ------------------------------------------------- #endif // TACH_H