tlv5618.c File Reference
#include "tlv5618.h"#include <cfg/compiler.h>#include <io/kfile.h>#include "hw/hw_tlv5618.h"#include <string.h>Go to the source code of this file.
Functions | |
| void | tlv5618_setOutA (Tlv5618 *ctx, uint16_t val) |
| Set DAC output A to val. | |
| void | tlv5618_setOutB (Tlv5618 *ctx, uint16_t val) |
| Set DAC output B to val. | |
| void | tlv5618_setPowerDown (Tlv5618 *ctx) |
| Set the TLV5618 in the power down state. | |
| void | tlv5618_init (Tlv5618 *ctx, KFile *ch, int cs_pin) |
| Init the TLV5618 with CS connected to cs_pin. | |
Detailed Description
Texas instrument TLV5618 DAC driver.
Definition in file tlv5618.c.
Function Documentation
| void tlv5618_init | ( | Tlv5618 * | ctx, | |
| KFile * | ch, | |||
| int | cs_pin | |||
| ) |
Init the TLV5618 with CS connected to cs_pin.
ch should be the SPI channel needed to communicate with the DAC. This SPI should also be correctly configured (the MOSI should change on the rising edge of the SCK clock).
- Note:
- the device is set in power down mode.
| void tlv5618_setOutA | ( | Tlv5618 * | ctx, | |
| uint16_t | val | |||
| ) |
