I2C. F1x testhal clean ups.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3575 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
barthess 2011-12-07 20:15:19 +00:00
parent 2fbafd292a
commit f1d3f29895
10 changed files with 182 additions and 41 deletions

View File

@ -1,3 +1,23 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
/** /**
* Not responding slave test * Not responding slave test
*/ */

View File

@ -1,3 +1,23 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef FAKE_H_ #ifndef FAKE_H_
#define FAKE_H_ #define FAKE_H_

View File

@ -1,10 +1,30 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
#include "ch.h" #include "ch.h"
#include "hal.h" #include "hal.h"
#include "i2c_pns.h" #include "i2c_pns.h"
#include "lis3.h" #include "lis3.h"
/* I2C1 */ /* I2C1 */
static const I2CConfig i2cfg1 = { static const I2CConfig i2cfg1 = {
OPMODE_I2C, OPMODE_I2C,

View File

@ -1,3 +1,23 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef I2C_PNS_H_ #ifndef I2C_PNS_H_
#define I2C_PNS_H_ #define I2C_PNS_H_

View File

@ -1,7 +1,26 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
/** /**
* This is most complex and difficult device. * This is device realize "read through write" paradigm. This is not
* It realize "read through write" paradigm. This is not standard, but * standard, but most of I2C devices use this paradigm.
* most of I2C devices use this paradigm.
* You must write to device reading address, send restart to bus, * You must write to device reading address, send restart to bus,
* and then begin reading process. * and then begin reading process.
*/ */

View File

@ -1,3 +1,23 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h> #include <stdlib.h>
#include "ch.h" #include "ch.h"

View File

@ -1,21 +1,22 @@
/** /*
* Lets imagine that we have board with LIS3LV02DL accelerometer on channel #1 ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
* and MAX1236 ADC, TMP75 thermometer on channel #2. 2011 Giovanni Di Sirio.
*
* NOTE: I assume, that you have datasheets on all this stuff. This file is part of ChibiOS/RT.
*
* NOTE: Also, I assume, that you know how to I2C works. ChibiOS/RT is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* In order from simplicity to complexity: the Free Software Foundation; either version 3 of the License, or
* TMP75 (at your option) any later version.
* MAX1236
* LIS3LV02DL ChibiOS/RT is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* Project splitted to separate source files for each device. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* Data from sensors we will be read from different thread sleeping different
* amount of time. You should have received a copy of the GNU General Public License
*/ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,19 +0,0 @@
/*
* main.h
*
* Created on: 25.03.2011
* Author: barthess
*/
#ifndef MAIN_H_
#define MAIN_H_
// ãëîáàëüíûå ôëàãè
#define GET_FILTERED_RAW_GYRO TRUE
#define GET_FILTERED_RAW_ACCEL TRUE
#endif /* MAIN_H_ */

View File

@ -1,3 +1,23 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
/** /**
* TMP75 is most simple I2C device in our case. It is already useful with * TMP75 is most simple I2C device in our case. It is already useful with
* default settings after powerup. * default settings after powerup.

View File

@ -1,3 +1,23 @@
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 3 of the License, or
(at your option) any later version.
ChibiOS/RT 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef TMP75_H_ #ifndef TMP75_H_
#define TMP75_H_ #define TMP75_H_