components/bt/host/bluedroid/stack/btm/btm_sec.c
/*******************************************************************************
**
** Function         BTM_SetPinType
**
** Description      Set PIN type for the device.
**
** Returns          void
**
*******************************************************************************/
Function         BTM_SetPinType
Description      Set PIN type for the device.

Returns          void
Function BTM_SetPinType Description Set PIN type for the device . Returns void
void BTM_SetPinType (UINT8 pin_type, PIN_CODE pin_code, UINT8 pin_code_len)
{
    BTM_TRACE_API ("BTM_SetPinType: pin type %d [variable-0, fixed-1], code %s, length %d\n",
                   pin_type, (char *) pin_code, pin_code_len);
    if ( (btm_cb.cfg.pin_type != pin_type)
            && controller_get_interface()->get_is_ready() ) {
        btsnd_hcic_write_pin_type (pin_type);
    }
    btm_cb.cfg.pin_type     = pin_type;
    btm_cb.cfg.pin_code_len = pin_code_len;
    memcpy (btm_cb.cfg.pin_code, pin_code, pin_code_len);
}
void BTM_SetPinType ( UINT8 pin_type , PIN_CODE pin_code , UINT8 pin_code_len ) { BTM_TRACE_API ( " \n " , pin_type , ( char * ) pin_code , pin_code_len ) ; if ( ( btm_cb . cfg . pin_type != pin_type ) && controller_get_interface ( ) -> get_is_ready ( ) ) { btsnd_hcic_write_pin_type ( pin_type ) ; } btm_cb . cfg . pin_type = pin_type ; btm_cb . cfg . pin_code_len = pin_code_len ; memcpy ( btm_cb . cfg . pin_code , pin_code , pin_code_len ) ; }
Function         BTM_SetPinType
Description      Set PIN type for the device.
Function BTM_SetPinType Description Set PIN type for the device .
/* If device is not up security mode will be set as a part of startup */