ACDC Senior Project v1.0.0
Senior Project for Textron Aviation
Loading...
Searching...
No Matches
ACDC_LTC1451_DAC.h
Go to the documentation of this file.
1
11#ifndef __ACDC_LTC1451_DAC_H
12#define __ACDC_LTC1451_DAC_H
13
14#include "stm32f1xx.h"
15#include "ACDC_stdint.h"
16
17typedef struct {
18 SPI_TypeDef *SPIx;
19 GPIO_TypeDef *GPIOx_CS;
21} LTC1451_t;
22
28LTC1451_t LTCDAC_InitCS(SPI_TypeDef *SPIx, GPIO_TypeDef *GPIOx, uint16_t GPIO_PIN);
29
33void LTCDAC_SetOutputCS(LTC1451_t LTC_DAC, uint16_t outputVal);
34
35#endif
void LTCDAC_SetOutputCS(LTC1451_t LTC_DAC, uint16_t outputVal)
Sets the DAC's ouptut voltage (0-4.095v)
Definition ACDC_LTC1451_DAC.c:24
LTC1451_t LTCDAC_InitCS(SPI_TypeDef *SPIx, GPIO_TypeDef *GPIOx, uint16_t GPIO_PIN)
Initiliazes SPIx and the external LTC1451 DAC. Also sets up the sofware CS pin for SPIx.
Definition ACDC_LTC1451_DAC.c:16
Header file for intx_t and uintx_t types.
unsigned short uint16_t
Definition ACDC_stdint.h:15
Definition ACDC_LTC1451_DAC.h:17
SPI_TypeDef * SPIx
Definition ACDC_LTC1451_DAC.h:18
GPIO_TypeDef * GPIOx_CS
Definition ACDC_LTC1451_DAC.h:19
uint16_t GPIO_PIN_CS
Definition ACDC_LTC1451_DAC.h:20