Skip to content

Nuvoton: Fix NUC472 SD-Host HW IP reset definition #7565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,19 @@ void NUMAKER_EMAC::packet_rx()
*/
bool NUMAKER_EMAC::link_out(emac_mem_buf_t *buf)
{
bool result;
bool result = false;
emac_mem_buf_t *q;
uint8_t *buffer = numaker_eth_get_tx_buf();
uint8_t *buffer = NULL;
uint32_t framelength = 0;
uint32_t bufferoffset = 0;
uint32_t byteslefttocopy = 0;
uint32_t payloadoffset = 0;

/* Get exclusive access */
TXLockMutex.lock();
buffer = numaker_eth_get_tx_buf();
NU_DEBUGF(("%s ... buffer=0x%x\r\n",__FUNCTION__, buffer));
if( buffer == NULL ) goto error;
/* copy frame from buf to driver buffers */
for (q = buf; q != NULL; q = memory_manager->get_next(q)) {

Expand Down
7 changes: 5 additions & 2 deletions targets/TARGET_NUVOTON/TARGET_NUC472/device/NUC472_442.h
Original file line number Diff line number Diff line change
Expand Up @@ -24427,8 +24427,11 @@ typedef struct {
#define SYS_IPRST0_USBHRST_Pos (4) /*!< SYS IPRST0: USBHRST Position */
#define SYS_IPRST0_USBHRST_Msk (0x1ul << SYS_IPRST0_USBHRST_Pos) /*!< SYS IPRST0: USBHRST Mask */

#define SYS_IPRST0_SDHRST_Pos (5) /*!< SYS IPRST0: SDHRST Position */
#define SYS_IPRST0_SDHRST_Msk (0x1ul << SYS_IPRST0_SDHRST_Pos) /*!< SYS IPRST0: SDHRST Mask */
#define SYS_IPRST0_EMACRST_Pos (5) /*!< SYS_T::IPRST0: EMACRST Position */
#define SYS_IPRST0_EMACRST_Msk (0x1ul << SYS_IPRST0_EMACRST_Pos) /*!< SYS_T::IPRST0: EMACRST Mask */

#define SYS_IPRST0_SDHRST_Pos (6) /*!< SYS_T::IPRST0: SDHRST Position */
#define SYS_IPRST0_SDHRST_Msk (0x1ul << SYS_IPRST0_SDHRST_Pos) /*!< SYS_T::IPRST0: SDHRST Mask */

#define SYS_IPRST0_SDHOST_RST_Pos (6) /*!< SYS IPRST0: SDHOST_RST Position */
#define SYS_IPRST0_SDHOST_RST_Msk (0x1ul << SYS_IPRST0_SDHOST_RST_Pos) /*!< SYS IPRST0: SDHOST_RST Mask */
Expand Down