asdf

Dependencies:   KellerDruck_pressure PID PWM-Coil-driver Sensirion_SF04 VL6180

Fork of TestBenchSerenity-proto_F429ZI by Ian Wolf

main.h

Committer:
iwolf32
Date:
2017-07-31
Revision:
6:330773526c35
Parent:
5:e3eff8a04b25

File content as of revision 6:330773526c35:

#ifndef MAIN_H
#define MAIN_H

#include "mbed.h"
#include "sensirion_sf04.h"

// Gas flow sensor defines
#define MAINFLOW_ADDR 0x40
// End gas flow sensor defines

Serial pc(USBTX, USBRX, 100000); // tx, rx, baud

// an I2C sub-class that provides a constructed default
class I2CPreInit : public I2C
{
public:
    I2CPreInit(PinName sda, PinName scl, int freq) : I2C(sda, scl) {
        frequency(freq);
    };
};

//I2CPreInit gI2C1(I2C_SDA, I2C_SCL, I2C frequency);
I2CPreInit i2c1(PB_9, PB_8, 100000);


// Sensirion gas flow sensor object (i2c object, i2c address, calibration field, resolution 9-16 bit)
SF04 mainflow(i2c1, MAINFLOW_ADDR, 0, 16); // Gas flow sensor (SFM7033)

#endif