lpcware

question about set_adress

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by joyhope on Mon Sep 23 19:14:45 MST 2013
In the lpcUSBlib

The set address is called SIE_WriteCommandData two times.

static inline void USB_Device_SetDeviceAddress(const uint8_t Address)
{
SIE_WriteCommandData(CMD_SET_ADDR, DAT_WR_BYTE(DEV_EN | Address)); /* Don't wait for next */
SIE_WriteCommandData(CMD_SET_ADDR, DAT_WR_BYTE(DEV_EN | Address)); /*  Setup Status Phase */
}

why the SIE_WriteCommandData should be called two times?



Outcomes