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.
33 lines
495 B
33 lines
495 B
5 years ago
|
/*
|
||
|
* dac101c085.h
|
||
|
*
|
||
|
* Created on: 21 Jul 2019
|
||
|
* Author: maximilian
|
||
|
*/
|
||
|
|
||
|
#ifndef DRIVERS_DAC101C085_H_
|
||
|
#define DRIVERS_DAC101C085_H_
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
#include "../platform/i2c.h"
|
||
|
#include "../os/error.h"
|
||
|
|
||
|
#define DAC_ADDR 78
|
||
|
#define I2Cx_DAC I2C1
|
||
|
|
||
|
/** Enum for power down mode.
|
||
|
*
|
||
|
*/
|
||
|
typedef enum
|
||
|
{
|
||
|
S_PD_2K5,
|
||
|
S_PD_100K,
|
||
|
S_HIGH_IMP
|
||
|
} powerDown_t;
|
||
|
|
||
|
void setDAC(uint16_t new_value);
|
||
|
uint16_t readDAC(void);
|
||
|
void powerDown(powerDown_t state);
|
||
|
|
||
|
#endif /* DRIVERS_DAC101C085_H_ */
|