Formatting

This commit is contained in:
Scott Lahteine
2019-09-16 20:27:04 -05:00
parent a06010e08a
commit 7d8c38693f
14 changed files with 47 additions and 66 deletions

View File

@ -199,9 +199,9 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t freque
/* 18 cycles maximum latency */
#define HAL_STEP_TIMER_ISR() \
extern "C" void TIMER1_COMPA_vect (void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER1_COMPA_vect_bottom (void) asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER1_COMPA_vect (void) { \
extern "C" void TIMER1_COMPA_vect(void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER1_COMPA_vect_bottom(void) asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER1_COMPA_vect(void) { \
__asm__ __volatile__ ( \
A("push r16") /* 2 Save R16 */ \
A("in r16, __SREG__") /* 1 Get SREG */ \
@ -272,9 +272,9 @@ void TIMER1_COMPA_vect_bottom(void)
/* 14 cycles maximum latency */
#define HAL_TEMP_TIMER_ISR() \
extern "C" void TIMER0_COMPB_vect (void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER0_COMPB_vect(void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER0_COMPB_vect_bottom(void) asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER0_COMPB_vect (void) { \
void TIMER0_COMPB_vect(void) { \
__asm__ __volatile__ ( \
A("push r16") /* 2 Save R16 */ \
A("in r16, __SREG__") /* 1 Get SREG */ \

View File

@ -428,7 +428,7 @@
static void spiTxBlockX(const uint8_t* buf, uint32_t todo) {
do {
(void) spiTransferTx(*buf++);
(void)spiTransferTx(*buf++);
} while (--todo);
}

View File

@ -94,11 +94,11 @@ typedef struct {
uint16_t payload_size;
//! Callback called after reception of ZLP from setup request
void (*callback) (void);
void (*callback)(void);
//! Callback called when the buffer given (.payload) is full or empty.
//! This one return false to abort data transfer, or true with a new buffer in .payload.
bool(*over_under_run) (void);
bool (*over_under_run)(void);
} udd_ctrl_request_t;
extern udd_ctrl_request_t udd_g_ctrlreq;
@ -123,7 +123,7 @@ extern udd_ctrl_request_t udd_g_ctrlreq;
* Registered by routine udd_ep_wait_stall_clear()
* Callback called when endpoint stall is cleared.
*/
typedef void (*udd_callback_halt_cleared_t) (void);
typedef void (*udd_callback_halt_cleared_t)(void);
/**
* \brief End of transfer callback function type.

View File

@ -82,7 +82,7 @@ typedef struct {
*
* \return \c 1 if function was successfully done, otherwise \c 0.
*/
bool(*enable) (void);
bool (*enable)(void);
/**
* \brief Disable the interface.
@ -95,7 +95,7 @@ typedef struct {
* - the device is detached from the host (i.e. Vbus is no
* longer present)
*/
void (*disable) (void);
void (*disable)(void);
/**
* \brief Handle a control request directed at an interface.
@ -108,7 +108,7 @@ typedef struct {
*
* \return \c 1 if this interface supports the SETUP request, otherwise \c 0.
*/
bool(*setup) (void);
bool (*setup)(void);
/**
* \brief Returns the current setting of the selected interface.
@ -117,12 +117,12 @@ typedef struct {
*
* \return alternate setting of selected interface
*/
uint8_t(*getsetting) (void);
uint8_t (*getsetting)(void);
/**
* \brief To signal that a SOF is occurred
*/
void(*sof_notify) (void);
void (*sof_notify)(void);
} udi_api_t;
//@}

View File

@ -85,7 +85,7 @@ extern uint16_t HAL_adc_result;
// ------------------------
// clear reset reason
void HAL_clear_reset_source (void);
void HAL_clear_reset_source(void);
// reset reason
uint8_t HAL_get_reset_source(void);

View File

@ -150,7 +150,7 @@ extern uint16_t HAL_adc_result;
void HAL_init(void);
// Clear reset reason
void HAL_clear_reset_source (void);
void HAL_clear_reset_source(void);
// Reset reason
uint8_t HAL_get_reset_source(void);

View File

@ -107,7 +107,7 @@ bool SDIO_ReadBlock_DMA(uint32_t blockAddress, uint8_t *data) {
dma_disable(SDIO_DMA_DEV, SDIO_DMA_CHANNEL);
if (SDIO->STA & SDIO_STA_RXDAVL) {
while (SDIO->STA & SDIO_STA_RXDAVL) (void) SDIO->FIFO;
while (SDIO->STA & SDIO_STA_RXDAVL) (void)SDIO->FIFO;
SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS);
return false;
}

View File

@ -153,7 +153,7 @@ extern uint16_t HAL_adc_result;
inline void HAL_init(void) { }
// Clear reset reason
void HAL_clear_reset_source (void);
void HAL_clear_reset_source(void);
// Reset reason
uint8_t HAL_get_reset_source(void);