You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
44 lines
1.0 KiB
#ifndef __ADC_SUBSYSTEM_HEADER__
|
|
#define __ADC_SUBSYSTEM_HEADER__
|
|
|
|
#include <stdio.h>
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
#include <sys/mman.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
|
|
#include "../../general/sitara-am437x.h"
|
|
//#include "sys_adc1MagSs.h"
|
|
//#include "sys_adc0TscSs.h"
|
|
#include "ti__adc1MagSs.h"
|
|
#include "ti__adc0TscSs.h"
|
|
|
|
/* 1.8V is ADC Maximum voltage
|
|
* ADC is 12 bit resolution
|
|
* 1.8/4096 = 0.000439
|
|
*
|
|
* */
|
|
#define ADC_WORK_SIMULTANEOUS_MODE
|
|
#define ADC_MULTIPLIER 0.000439453125f
|
|
#define ADC_CLK_DIV 11 //(11+1)
|
|
|
|
bool init_ADC_0( void );
|
|
bool init_ADC_1( void );
|
|
|
|
void prepareFSM1( void );
|
|
void startADC1( void );
|
|
|
|
void prepareFSM0( void );
|
|
void startADC0( void );
|
|
|
|
uint32_t getRevisionADC1( void );
|
|
uint32_t getRevisionADC0( void );
|
|
uint32_t getSizeADC1_FIFO( uint8_t ID );
|
|
uint32_t getSizeADC0_FIFO( uint8_t ID );
|
|
uint32_t getDataADC1_FIFO0( uint32_t timeOut );
|
|
uint32_t getDataADC1_FIFO1( uint32_t timeOut );
|
|
|
|
#endif
|