USBD_DevSelfPwrSet

Description

Sets the powered state (self- or bus-powered) when the device is in the addressed state, before a configuration is set.

Files

usbd_core.h/usbd_core.c

Prototype

void  USBD_DevSelfPwrSet (CPU_INT08U    dev_nbr,
                          CPU_BOOLEAN   self_pwr,
                          USBD_ERR     *p_err);


Arguments

dev_nbr

Device number.

self_pwr

The power source of the device:

DEF_TRUE if device is self-powered.
DEF_FALSE if device is bus-powered.

p_err

Pointer to variable that will receive the return error code from this function:

USBD_ERR_NONE
USBD_ERR_DEV_INVALID_NBR

Returned Value

None.

Callers

Application.

Notes / Warnings

None.