|
void: G2 ]; Q% S( J: E' ? DAC_Init(void)- A. ~( c9 r0 `, E7 k& a: F8 C { /* (1) Enable the peripheral clock of GPIOA */ /* (2) Select analog mode for PA4 (reset value) */ GPIOPinInitial(ZITON_COMM_TX_PORT," Q% N7 t9 [% K {" V5 ] ZITON_COMM_TX_PIN_NUMBER,& e) p$ I) b- @, C9 p GPIO_MOD_ANALOG_FUNCTION,# \' Z3 g6 u; W; J GPIO_NOPUPD); /* (1) Enable the peripheral clock of the DAC */* R: j% m% z& C3 L& X7 _+ j+ b /* (2) Enable the DAC ch1 */ /* (3) disable the DAC ch1 */9 T5 D7 _! o& O9 B; c- e) a. c RCC->APB1ENR |= RCC_APB1ENR_DACEN; /* (1) */; @, _3 k) r$ j' z- ~; }% ? DAC->CR |= DAC_CR_EN1 | DAC_CR_BOFF1; /* (2) */ #if 0' W0 W5 h3 z) N- J DAC->CR &= ~DAC_CR_EN1; /* (3) */ #endif' g: i. h1 J; ?4 e' J } |
我擦。人才。。这都能发帖出来
|
微信公众号
手机版