Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint8_t dac_loop(void) {
- uint8_t res = RET_OK;
- if((DMA1->HISR & DMA_HISR_HTIF5) && loop_go) {
- res = fsm_read_file(current_file, &dac_buff[0], 256);
- DMA1->HIFCR |= DMA_HIFCR_CHTIF5;
- if(res == RET_FILE_FINISHED) {
- return RET_FILE_FINISHED;
- }
- }
- if((DMA1->HISR & DMA_HISR_TCIF5) && loop_go) {
- res = fsm_read_file(current_file, &dac_buff[256], 256);
- DMA1->HIFCR |= DMA_HIFCR_CTCIF5;
- if(res == RET_FILE_FINISHED) {
- return RET_FILE_FINISHED;
- }
- }
- return RET_OK;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement