Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison hw.c @ 31:03592ca4d37e
Port tempctrl.c from AVR. I removed the beep code as I don't have a
beeper on the STM32 board.
Reworked the heat/cool stuff so it can use separate ports.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Tue, 27 Nov 2012 13:20:52 +1030 |
parents | 435c6330896c |
children | 188d5a8a7470 |
comparison
equal
deleted
inserted
replaced
30:435c6330896c | 31:03592ca4d37e |
---|---|
274 | 274 |
275 /* Setup for single pulse mode clear UDIS */ | 275 /* Setup for single pulse mode clear UDIS */ |
276 TIM_SelectOnePulseMode(TIM6, TIM_OPMode_Single); | 276 TIM_SelectOnePulseMode(TIM6, TIM_OPMode_Single); |
277 TIM_UpdateDisableConfig(TIM6, DISABLE); | 277 TIM_UpdateDisableConfig(TIM6, DISABLE); |
278 | 278 |
279 /* Setup GPIO for delay test & 1-wire | 279 /* Setup GPIO for delay test (2) 1-wire (3) & temp ctrl (4/5) |
280 * PE2 -> pin 3 on header | 280 * PE2 -> 3 (on header) |
281 * PE3 -> pin 4 on header */ | 281 * PE3 -> 4 |
282 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3; | 282 * PE4 -> 5 |
283 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; | 283 * PE5 -> 6 |
284 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; | 284 */ |
285 GPIO_Init(GPIOE, &GPIO_InitStructure); | 285 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5; |
286 | 286 |
287 OWInit(); | 287 OWInit(); |
288 | 288 |
289 #if 0 | 289 #if 0 |
290 while (1) { | 290 while (1) { |