25
D6F-PH MEMS Differential pressure Sensor User’s Manual (A288)
10-2.
D6F_PH_Sample.c
/*=================================================*/
/* D6F-PH Digital Flow Sensor Sample Code (using STM32)
* :Copyright: (C) OMRON Corporation, Microdevice H.Q.
* :Auther :
* :Revision: $Rev$
* :Id: $Id$
* :Date: $Date$
*
* All Rights Reserved
* OMRON Proprietary Right
*=================================================*/
#include "stm32f10x_i2c.h"
#include "D6F_PH_Sample.h"
#define I2C1_SCL_PIN GPIO_Pin_6
#define I2C1_SDA_PIN GPIO_Pin_7
#define I2C2_SCL_PIN GPIO_Pin_10
#define I2C2_SDA_PIN GPIO_Pin_11
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned long uint32;
short RD_FIFO; /* 16bit data width */
unsigned short uRD_FIFO; /* 16bit data width */
uint8_t RD_REG; /* 8bit data width */
char setting_done_flag = 0;
// Dummy wait routine
void adc_wait(volatile unsigned long delay)
{
while(delay) delay--;
}
/*=================================================*/
/* Initialize Function */
/* Usage : Initialize( void ) */
/* Argument : Null */
/* Return value : T.B.D */
/*=================================================*/
void Initialize( void )
{
/* EEPROM Control <= 00h */