Remove ack-button.c to use the driver in Chopstx.
This commit is contained in:
2
chopstx
2
chopstx
Submodule chopstx updated: 43bbdb44dc...49b0556a24
@@ -51,7 +51,6 @@ endif
|
||||
|
||||
ifeq ($(CHIP),stm32f103)
|
||||
CSRC += mcu-stm32f103.c
|
||||
CSRC += ack-button.c
|
||||
endif
|
||||
|
||||
###################################
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <chopstx.h>
|
||||
|
||||
#include "board.h"
|
||||
#include "mcu/stm32f103.h"
|
||||
|
||||
void
|
||||
ackbtn_init (chopstx_intr_t *intr)
|
||||
{
|
||||
chopstx_claim_irq (intr, INTR_REQ_EXTI);
|
||||
|
||||
/* Configure EXTI line */
|
||||
#ifdef AFIO_EXTICR_INDEX
|
||||
AFIO->EXTICR[AFIO_EXTICR_INDEX] = AFIO_EXTICR1_EXTIx_Py;
|
||||
#endif
|
||||
EXTI->IMR &= ~EXTI_IMR;
|
||||
EXTI->RTSR |= EXTI_RTSR_TR;
|
||||
}
|
||||
|
||||
void
|
||||
ackbtn_enable (void)
|
||||
{
|
||||
EXTI->PR |= EXTI_PR;
|
||||
EXTI->IMR |= EXTI_IMR;
|
||||
}
|
||||
|
||||
void
|
||||
ackbtn_disable (void)
|
||||
{
|
||||
EXTI->IMR &= ~EXTI_IMR;
|
||||
EXTI->PR |= EXTI_PR;
|
||||
}
|
||||
|
||||
|
||||
@@ -472,11 +472,6 @@ int pinpad_getline (int msg_code, uint32_t timeout_usec);
|
||||
|
||||
#endif
|
||||
|
||||
struct chx_intr;
|
||||
void ackbtn_init (struct chx_intr *intr);
|
||||
void ackbtn_enable (void);
|
||||
void ackbtn_disable (void);
|
||||
|
||||
|
||||
extern uint8_t _regnual_start, __heap_end__[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user