File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
features/netsocket/emac-drivers/TARGET_NUVOTON_EMAC
targets/TARGET_NUVOTON/TARGET_NUC472/device Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -220,17 +220,19 @@ void NUMAKER_EMAC::packet_rx()
220
220
*/
221
221
bool NUMAKER_EMAC::link_out (emac_mem_buf_t *buf)
222
222
{
223
- bool result;
223
+ bool result = false ;
224
224
emac_mem_buf_t *q;
225
- uint8_t *buffer = numaker_eth_get_tx_buf () ;
225
+ uint8_t *buffer = NULL ;
226
226
uint32_t framelength = 0 ;
227
227
uint32_t bufferoffset = 0 ;
228
228
uint32_t byteslefttocopy = 0 ;
229
229
uint32_t payloadoffset = 0 ;
230
230
231
231
/* Get exclusive access */
232
232
TXLockMutex.lock ();
233
+ buffer = numaker_eth_get_tx_buf ();
233
234
NU_DEBUGF ((" %s ... buffer=0x%x\r\n " ,__FUNCTION__, buffer));
235
+ if ( buffer == NULL ) goto error;
234
236
/* copy frame from buf to driver buffers */
235
237
for (q = buf; q != NULL ; q = memory_manager->get_next (q)) {
236
238
Original file line number Diff line number Diff line change @@ -24427,8 +24427,11 @@ typedef struct {
24427
24427
#define SYS_IPRST0_USBHRST_Pos (4) /*!< SYS IPRST0: USBHRST Position */
24428
24428
#define SYS_IPRST0_USBHRST_Msk (0x1ul << SYS_IPRST0_USBHRST_Pos) /*!< SYS IPRST0: USBHRST Mask */
24429
24429
24430
- #define SYS_IPRST0_SDHRST_Pos (5) /*!< SYS IPRST0: SDHRST Position */
24431
- #define SYS_IPRST0_SDHRST_Msk (0x1ul << SYS_IPRST0_SDHRST_Pos) /*!< SYS IPRST0: SDHRST Mask */
24430
+ #define SYS_IPRST0_EMACRST_Pos (5) /*!< SYS_T::IPRST0: EMACRST Position */
24431
+ #define SYS_IPRST0_EMACRST_Msk (0x1ul << SYS_IPRST0_EMACRST_Pos) /*!< SYS_T::IPRST0: EMACRST Mask */
24432
+
24433
+ #define SYS_IPRST0_SDHRST_Pos (6) /*!< SYS_T::IPRST0: SDHRST Position */
24434
+ #define SYS_IPRST0_SDHRST_Msk (0x1ul << SYS_IPRST0_SDHRST_Pos) /*!< SYS_T::IPRST0: SDHRST Mask */
24432
24435
24433
24436
#define SYS_IPRST0_SDHOST_RST_Pos (6) /*!< SYS IPRST0: SDHOST_RST Position */
24434
24437
#define SYS_IPRST0_SDHOST_RST_Msk (0x1ul << SYS_IPRST0_SDHOST_RST_Pos) /*!< SYS IPRST0: SDHOST_RST Mask */
You can’t perform that action at this time.
0 commit comments