inverse_thermal_camera/src/main.c

39 lines
822 B
C
Raw Normal View History

2018-07-29 18:24:52 +02:00
#include "main.h"
int main(void)
{
2018-08-04 17:00:41 +02:00
RCC->APB2ENR |= RCC_APB2ENR_IOPCEN;
GPIOC->CRH = (GPIOC->CRH
2018-08-24 01:25:05 +02:00
& ~(0x0f << (4 * PIN_LED - 32))
& ~(0x0f << (4 * PIN_SUPPLY - 32)))
2018-08-04 17:00:41 +02:00
| (0x01 << (4 * PIN_LED - 32)) // Output, max. 10 MHz
2018-08-24 01:25:05 +02:00
| (0x01 << (4 * PIN_SUPPLY - 32)) // Output, max. 10 MHz
2018-08-04 17:00:41 +02:00
;
2018-08-24 01:25:05 +02:00
GPIOC->BSRR = (1 << PIN_SUPPLY);
Camera_Init();
LTP1245_Init();
2018-08-23 13:56:51 +02:00
LTP1245_FeedPaper(100);
2018-08-04 16:11:18 +02:00
LTP1245_FeedPaper(10);
// LTP1245_Cut();
2018-08-23 12:30:47 +02:00
while(!Camera_Captured);
2018-08-23 12:49:29 +02:00
extern uint8_t ImageBuffer[CAMERA_IMAGE_WIDTH * CAMERA_IMAGE_HEIGHT / 8];
2018-08-23 13:39:45 +02:00
Print_Image(ImageBuffer, CAMERA_IMAGE_WIDTH, CAMERA_IMAGE_HEIGHT, 2);
2018-08-23 12:30:47 +02:00
2018-08-23 13:56:51 +02:00
LTP1245_FeedPaper(100);
LTP1245_FeedPaper(10);
2018-08-24 01:25:05 +02:00
GPIOC->BRR = (1 << PIN_SUPPLY);
2018-07-29 18:24:52 +02:00
for(;;)
{
2018-08-23 13:56:51 +02:00
__WFI();
2018-07-29 18:24:52 +02:00
}
}