This commit is contained in:
King Kévin 2017-01-30 09:46:54 +01:00
parent f09e5cb98a
commit 98469964a5
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ void sensor_sdm120_setup(uint32_t baudrate)
gpio_set_mode(GPIO(SENSOR_SDM120_REDE_PORT), GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO(SENSOR_SDM120_REDE_PIN)); // setup GPIO pin for receiver and driver output enable pin
gpio_clear(GPIO(SENSOR_SDM120_REDE_PORT),GPIO(SENSOR_SDM120_REDE_PIN)); // disable driver output and enable receive output
// setup timer to wait for minimal time before sending transmitting
// setup timer to wait for minimal time before next transmission
rcc_periph_clock_enable(RCC_TIM(SENSOR_SDM120_TIMER)); // enable clock for timer block
timer_reset(TIM(SENSOR_SDM120_TIMER)); // reset timer state
timer_set_mode(TIM(SENSOR_SDM120_TIMER), TIM_CR1_CKD_CK_INT, TIM_CR1_CMS_EDGE, TIM_CR1_DIR_UP); // set timer mode, use undivided timer clock,edge alignment (simple count), and count up