FreeBSD/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c
/* Send Read_PIN_Type command to the unit */
Send Read_PIN_Type command to the unit
Send Read_PIN_Type command to the unit
static int
hci_read_pin_type(int s, int argc, char **argv)
{
	ng_hci_read_pin_type_rp	rp;
	int			n;
	n = sizeof(rp);
	if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_HC_BASEBAND,
			NG_HCI_OCF_READ_PIN_TYPE),
			(char *) &rp, &n) == ERROR)
		return (ERROR);
	if (rp.status != 0x00) {
		fprintf(stdout, "Status: %s [%#02x]\n", 
			hci_status2str(rp.status), rp.status);
		return (FAILED);
	}
	fprintf(stdout, "PIN type: %s [%#02x]\n",
			hci_pin2str(rp.pin_type), rp.pin_type);
	return (OK);
}
static int hci_read_pin_type ( int s , int argc , char * * argv ) { ng_hci_read_pin_type_rp rp ; int n ; n = sizeof ( rp ) ; if ( hci_simple_request ( s , NG_HCI_OPCODE ( NG_HCI_OGF_HC_BASEBAND , NG_HCI_OCF_READ_PIN_TYPE ) , ( char * ) & rp , & n ) == ERROR ) return ( ERROR ) ; if ( rp . status != 0x00 ) { fprintf ( stdout , " \n " , hci_status2str ( rp . status ) , rp . status ) ; return ( FAILED ) ; } fprintf ( stdout , " \n " , hci_pin2str ( rp . pin_type ) , rp . pin_type ) ; return ( OK ) ; }
Send Read_PIN_Type command to the unit
Send Read_PIN_Type command to the unit