diff --git a/build-number.txt b/build-number.txt index f52aaac..615d0e0 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -484 +486 diff --git a/src/main.c b/src/main.c index d5392a4..a21e05d 100755 --- a/src/main.c +++ b/src/main.c @@ -5,9 +5,13 @@ int main(void) RCC->APB2ENR |= RCC_APB2ENR_IOPCEN; GPIOC->CRH = (GPIOC->CRH - & ~(0x0f << (4 * PIN_LED - 32))) + & ~(0x0f << (4 * PIN_LED - 32)) + & ~(0x0f << (4 * PIN_SUPPLY - 32))) | (0x01 << (4 * PIN_LED - 32)) // Output, max. 10 MHz + | (0x01 << (4 * PIN_SUPPLY - 32)) // Output, max. 10 MHz ; + + GPIOC->BSRR = (1 << PIN_SUPPLY); Camera_Init(); LTP1245_Init(); @@ -24,6 +28,8 @@ int main(void) LTP1245_FeedPaper(100); LTP1245_FeedPaper(10); + GPIOC->BRR = (1 << PIN_SUPPLY); + for(;;) { __WFI(); diff --git a/src/ov7670.c b/src/ov7670.c index 99000ab..703da7f 100644 --- a/src/ov7670.c +++ b/src/ov7670.c @@ -310,7 +310,7 @@ void TIM1_CC_IRQHandler(void) CurrentLine = 0; FrameCount++; - if(FrameCount == 10) + if(FrameCount == 5) { Camera_Captured = 1; // Disable everything diff --git a/src/pinning.h b/src/pinning.h index 7a1ad91..9a44990 100755 --- a/src/pinning.h +++ b/src/pinning.h @@ -19,7 +19,6 @@ // Port B #define PIN_THERMISTOR 0 // PB0 - Thermistor (ADC12_IN8) #define PIN_VBATT 1 // PB1 - Battery monitor (ADC12_IN9) -#define PIN_SUPPLY 2 // PB2 - Voltage regulator enable #define PIN_PAPER 3 // PB3 - Paper detect #define PIN_CAMERA_PCLK 4 // PB4 - Camera pixel clock (TIM3_CH1) #define PIN_CAMERA_HSYNC 5 // PB5 - Camera VSYNC (TIM3_CH2) @@ -36,3 +35,4 @@ // Port C #define PIN_LED 13 // PC13 - Status LED +#define PIN_SUPPLY 14 // PC14 - Voltage regulator enable