Commit ebeecb50 authored by Andrey Filippov's avatar Andrey Filippov

Made to build OK

parent a2b69d21
...@@ -28,4 +28,4 @@ obj-$(CONFIG_ELPHEL393) += histograms.o ...@@ -28,4 +28,4 @@ obj-$(CONFIG_ELPHEL393) += histograms.o
obj-$(CONFIG_ELPHEL393) += pgm_functions.o obj-$(CONFIG_ELPHEL393) += pgm_functions.o
obj-$(CONFIG_ELPHEL393) += mt9x001.o obj-$(CONFIG_ELPHEL393) += mt9x001.o
obj-$(CONFIG_ELPHEL393) += multi10359.o obj-$(CONFIG_ELPHEL393) += multi10359.o
obj-$(CONFIG_ELPHEL393) += imu_log393.o
/*!*************************************************************************** /** @file imu_log393.c
*! FILE NAME : imu_log353.c *
*! DESCRIPTION: reading IMU log fifo * @brief reading logger data
*! Copyright (C) 2011 Elphel, Inc. *
*! -----------------------------------------------------------------------------** * @copyright Copyright (C) 2011-2016 Elphel, Inc
*! *
*! This program is free software: you can redistribute it and/or modify * @par <b>License</b>
*! it under the terms of the GNU General Public License as published by * This program is free software: you can redistribute it and/or modify
*! the Free Software Foundation, either version 3 of the License, or * it under the terms of the GNU General Public License as published by
*! (at your option) any later version. * the Free Software Foundation, either version 3 of the License, or
*! * (at your option) any later version.
*! This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
*! but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
*! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*! GNU General Public License for more details. * GNU General Public License for more details.
*! * You should have received a copy of the GNU General Public License
*! You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.
*! along with this program. If not, see <http://www.gnu.org/licenses/>. */
*! -----------------------------------------------------------------------------** /*-----------------------------------------------------------------------------**
*! $Log: imu_log353.c,v $ *! $Log: imu_log353.c,v $
*! Revision 1.5 2012/04/14 03:53:48 elphel *! Revision 1.5 2012/04/14 03:53:48 elphel
*! bug fix in the driver (was producing errors in 3-4 hours) *! bug fix in the driver (was producing errors in 3-4 hours)
...@@ -380,7 +380,7 @@ static void set_logger_params(int which){ // 1 - program IOPINS, 2 - reset first ...@@ -380,7 +380,7 @@ static void set_logger_params(int which){ // 1 - program IOPINS, 2 - reset first
#else #else
gpio_set_pins.d32 = 0; gpio_set_pins.d32 = 0;
gpio_set_pins.chn_c = 3; // enable gpio_set_pins.chn_c = 3; // enable
x393_gpio_set_pins(gpio_set_pins.chn_c); x393_gpio_set_pins(gpio_set_pins);
#endif #endif
///TODO: add enabling via i2c (bus=1&raw=0x2300&data=0xfe) ///TODO: add enabling via i2c (bus=1&raw=0x2300&data=0xfe)
...@@ -829,7 +829,12 @@ static ssize_t imu_read(struct file * file, char * buf, size_t count, loff_t *of ...@@ -829,7 +829,12 @@ static ssize_t imu_read(struct file * file, char * buf, size_t count, loff_t *of
/// should we wait for data? /// should we wait for data?
idbg=0; idbg=0;
while ((sleep[0]!=0) && ((numBytesWritten-thisNumBytesRead)<= 64)) { /// last 32 bytes can get stuck in ETRAX dma channel while ((sleep[0]!=0) && ((numBytesWritten-thisNumBytesRead)<= 64)) { /// last 32 bytes can get stuck in ETRAX dma channel
schedule_usleep(*sleep);
#ifdef NC353
schedule_usleep(*sleep); // ETRAX-specific wait, replace!
#else
BUG();
#endif
updateNumBytesWritten(); updateNumBytesWritten();
// numBytesWritten= (int) port_csp0_addr[X313_RA_IMU_COUNT]<<6; // numBytesWritten= (int) port_csp0_addr[X313_RA_IMU_COUNT]<<6;
// if ( thisNumBytesRead > numBytesWritten) thisNumBytesRead-= (IMU_COUNT_OVERFLOW<<6); // may become negative here // if ( thisNumBytesRead > numBytesWritten) thisNumBytesRead-= (IMU_COUNT_OVERFLOW<<6); // may become negative here
......
/** @file imu_log393.h
*
* @brief reading logger data
*
* @copyright Copyright (C) 2011-2016 Elphel, Inc
*
* @par <b>License</b>
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
void x313_dma1_start(void); void x313_dma1_start(void);
int x313_dma1_stop(void); int x313_dma1_stop(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment