Remove SD card detect code

This commit is contained in:
fruchti 2020-05-23 22:13:28 +02:00
parent 2a0b7e31a1
commit 2a9bf62d5b
2 changed files with 3 additions and 10 deletions

View file

@ -1 +1 @@
544 545

View file

@ -2,25 +2,18 @@
int main(void) int main(void)
{ {
RCC->APB2ENR |= RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN; RCC->APB2ENR |= RCC_APB2ENR_IOPCEN;
GPIOC->CRH = (GPIOC->CRH GPIOC->CRH = (GPIOC->CRH
& ~(0x0f << (4 * PIN_SUPPLY - 32))) & ~(0x0f << (4 * PIN_SUPPLY - 32)))
| (0x01 << (4 * PIN_SUPPLY - 32)) // Output, max. 10 MHz | (0x01 << (4 * PIN_SUPPLY - 32)) // Output, max. 10 MHz
; ;
GPIOB->CRL = (GPIOB->CRL
& ~(0x0f << (4 * PIN_SD_CARD_DETECT)))
| (0x08 << (4 * PIN_SD_CARD_DETECT)) // Input with pull-up/-down
;
// Use pull-up
GPIOB->BSRR = (1 << PIN_SD_CARD_DETECT);
GPIOC->BSRR = (1 << PIN_SUPPLY); GPIOC->BSRR = (1 << PIN_SUPPLY);
Camera_Init(); Camera_Init();
LTP1245_Init(); LTP1245_Init();
LTP1245_FeedPaper(100); LTP1245_FeedPaper(100);
LTP1245_FeedPaper(10); LTP1245_FeedPaper(10);