2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * \brief This module provides structure and functions to filter a ramp.
26 * \date 6.01.2005 @ 12:00
27 * \todo Verify the english language
28 * \test filter a constante value to generate a ramp on the hardware. Everything is all right
37 /** \brief Definition of structur ramp_filter */
40 uint32_t var_neg; /**Authorized negative variation*/
41 uint32_t var_pos; /**Authorized positive variation*/
42 int32_t prev_out; /**Previous value calculated*/
47 /* Begin prototyping ************************/
49 /**\brief Initialisation of the ramp_filter structur
50 *\param r ramp_filter structur to initiate
53 void ramp_init(struct ramp_filter * r );
56 /**\brief Set the fields of the ramp_filter structur
57 *\param r ramp_structure to modificate
58 *\param neg limit for the negative variation
59 *\param pos limit for the positive variation
62 void ramp_set_vars(struct ramp_filter * r, uint32_t neg, uint32_t pos);
65 /** \brief Apply ramp_filter to a ramp
66 * \param r ramp_filter used to filter the in
67 * \param in ramp to filter
72 int32_t ramp_do_filter(void * r, int32_t in);
74 #endif /* ifndef _RAMP_H */