style code for consistency with existing codebase

This commit is contained in:
Rafael Silva
2022-03-21 16:02:11 +00:00
parent e0220c6594
commit 60aae59eeb
7 changed files with 1074 additions and 1070 deletions

View File

@@ -1,4 +1,4 @@
/*
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 Koji Kitayama
@@ -31,8 +31,10 @@
// We disable SOF for now until needed later on
#define USE_SOF 0
#if CFG_TUD_ENABLED && (CFG_TUSB_MCU == OPT_MCU_RX63X || CFG_TUSB_MCU == OPT_MCU_RX65X || CFG_TUSB_MCU == OPT_MCU_RX72N || \
CFG_TUSB_MCU == OPT_MCU_RAXXX)
#if CFG_TUD_ENABLED && (CFG_TUSB_MCU == OPT_MCU_RX63X || \
CFG_TUSB_MCU == OPT_MCU_RX65X || \
CFG_TUSB_MCU == OPT_MCU_RX72N || \
CFG_TUSB_MCU == OPT_MCU_RAXXX)
#include "device/dcd.h"
#include "link_type.h"

View File

@@ -1,4 +1,4 @@
/*
/*
* The MIT License (MIT)
*
* Copyright (c) 2021 Koji Kitayama
@@ -27,8 +27,10 @@
#include "tusb_option.h"
#if CFG_TUD_ENABLED && (CFG_TUSB_MCU == OPT_MCU_RX63X || CFG_TUSB_MCU == OPT_MCU_RX65X || CFG_TUSB_MCU == OPT_MCU_RX72N || \
CFG_TUSB_MCU == OPT_MCU_RAXXX)
#if CFG_TUD_ENABLED && (CFG_TUSB_MCU == OPT_MCU_RX63X || \
CFG_TUSB_MCU == OPT_MCU_RX65X || \
CFG_TUSB_MCU == OPT_MCU_RX72N || \
CFG_TUSB_MCU == OPT_MCU_RAXXX)
#include "host/hcd.h"
#include "link_type.h"
@@ -488,7 +490,7 @@ void hcd_int_disable(uint8_t rhport)
uint32_t hcd_frame_number(uint8_t rhport)
{
(void)rhport;
/* The device must be reset at least once after connection
/* The device must be reset at least once after connection
* in order to start the frame counter. */
if (_hcd.need_reset) hcd_port_reset(rhport);
return LINK_REG->FRMNUM_b.FRNM;

View File

@@ -41,15 +41,15 @@ extern "C" {
TU_ATTR_ALWAYS_INLINE
static inline void link_int_enable(uint8_t rhport)
{
(void) rhport;
NVIC_EnableIRQ(TU_IRQn);
(void) rhport;
NVIC_EnableIRQ(TU_IRQn);
}
TU_ATTR_ALWAYS_INLINE
static inline void link_int_disable(uint8_t rhport)
{
(void) rhport;
NVIC_DisableIRQ(TU_IRQn);
(void) rhport;
NVIC_DisableIRQ(TU_IRQn);
}
// MCU specific PHY init

View File

@@ -41,21 +41,21 @@ extern "C" {
static inline void link_int_enable(uint8_t rhport)
{
(void) rhport;
(void) rhport;
#if (CFG_TUSB_MCU == OPT_MCU_RX72N)
IEN(PERIB, INTB185) = 1;
IEN(PERIB, INTB185) = 1;
#else
IEN(USB0, USBI0) = 1;
IEN(USB0, USBI0) = 1;
#endif
}
static inline void link_int_disable(uint8_t rhport)
{
(void) rhport;
(void) rhport;
#if (CFG_TUSB_MCU == OPT_MCU_RX72N)
IEN(PERIB, INTB185) = 0;
IEN(PERIB, INTB185) = 0;
#else
IEN(USB0, USBI0) = 0;
IEN(USB0, USBI0) = 0;
#endif
}
@@ -63,9 +63,9 @@ static inline void link_int_disable(uint8_t rhport)
static inline void link_phy_init(void)
{
#if (CFG_TUSB_MCU == OPT_MCU_RX72N)
IR(PERIB, INTB185) = 0;
IR(PERIB, INTB185) = 0;
#else
IR(USB0, USBI0) = 0;
IR(USB0, USBI0) = 0;
#endif
}

File diff suppressed because it is too large Load Diff