You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
410 B
C

/*
* spi.h
*
* Created on: Apr 8, 2024
* Author: NikmaOS-W
*/
#ifndef USER_SPI_H_
#define USER_SPI_H_
#include "ch32v00x.h"
#define DAC_CHIP_SELECT_LOW {GPIO_WriteBit(GPIOC, GPIO_Pin_4, Bit_RESET);}
#define DAC_CHIP_SELECT_HIGH {GPIO_WriteBit(GPIOC, GPIO_Pin_4, Bit_SET);}
void DAC_SPI_Init(void);
void DAC_Transmit(SPI_TypeDef *SPIx, uint8_t * Data, uint16_t Size);
#endif /* USER_SPI_H_ */