mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-20 18:40:57 +00:00
print out mac address
This commit is contained in:
parent
23f4d7356f
commit
d3e83bc802
@ -48,10 +48,15 @@
|
||||
// MACRO CONSTANT TYPEDEF
|
||||
//--------------------------------------------------------------------+
|
||||
void tusbh_cdc_rndis_mounted_cb(uint8_t dev_addr)
|
||||
{
|
||||
// application set-up
|
||||
{ // application set-up
|
||||
uint8_t mac_address[6];
|
||||
|
||||
printf("a RNDIS device is mounted\n");
|
||||
tusbh_cdc_rndis_get_mac_addr(dev_addr, mac_address);
|
||||
|
||||
printf("MAC Address ");
|
||||
for(uint8_t i=0; i<6; i++) printf("%X ", mac_address[i]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void tusbh_cdc_rndis_unmounted_isr(uint8_t dev_addr)
|
||||
|
@ -189,6 +189,7 @@ tusb_error_t rndish_open_subtask(uint8_t dev_addr, cdch_data_t *p_cdc)
|
||||
if ( TUSB_ERROR_NONE != error ) SUBTASK_EXIT(error);
|
||||
|
||||
rndis_msg_query_cmplt_t * const p_query_cmpt = (rndis_msg_query_cmplt_t *) msg_payload;
|
||||
SUBTASK_ASSERT(p_query_cmpt->type == RNDIS_MSG_QUERY_CMPLT && p_query_cmpt->status == RNDIS_STATUS_SUCCESS);
|
||||
memcpy(rndish_data[dev_addr-1].mac_address, msg_payload + 8 + p_query_cmpt->buffer_offset, 6);
|
||||
|
||||
if ( tusbh_cdc_rndis_mounted_cb )
|
||||
|
Loading…
x
Reference in New Issue
Block a user