SPIKE-RT C API Reference [Japanese]
An RTOS-based software platform for LEGO® Education SPIKE™.
関数
Bluetooth

BluetoothのAPI. [詳解]

関数

pbio_error_t hub_bluetooth_enable_advertising (void)
 Bluetoothのアドバタイジング(接続待ち)を許可する. [詳解]
 
pbio_error_t hub_bluetooth_disable_advertising (void)
 Bluetoothのアドバタイジング(接続待ち)を禁止する. [詳解]
 
pbio_error_t hub_bluetooth_is_connected (bool *connected)
 Bluetoothが接続されているかどうかを検出する. [詳解]
 

詳解

BluetoothのAPI.

通常はこれらのAPIを意識する必要はない。

関数詳解

◆ hub_bluetooth_disable_advertising()

pbio_error_t hub_bluetooth_disable_advertising ( void  )

Bluetoothのアドバタイジング(接続待ち)を禁止する.

禁止されている,または,接続されているとき,Bluetoothのアドバタイジングは無効化される.

戻り値
エラー番号.

◆ hub_bluetooth_enable_advertising()

pbio_error_t hub_bluetooth_enable_advertising ( void  )

Bluetoothのアドバタイジング(接続待ち)を許可する.

許可されており,未接続のとき,かつそのときに限り,Bluetoothのアドバタイジングは有効化される. Bluetoothに対してserial_opn_por()を実行すると,このAPIが呼び出されるので,通常はこのAPIは手動で呼び出す必要はない。

戻り値
エラー番号.

◆ hub_bluetooth_is_connected()

pbio_error_t hub_bluetooth_is_connected ( bool *  connected)

Bluetoothが接続されているかどうかを検出する.

引数
[out]connectedBluetoothが接続されているかどうか. 接続されているならば,true,未接続ならば,false. \return エラー番号.