I'm using the BGScript for Bluetooth program. BGScript provides H/W interrupt listener API. The listener API name is hardware_io_port_status(delta, port, irq, state)
What I want to see the value are irq and state. BGScript can display value by using the SPI interface. The API interface is hardware_spi_transfer(channel, data_len, value_data)
I can display a string value like this
call hardware_spi_transfer(0,15,"Button 0 ") # OK
call hardware_spi_transfer(0,15,state) # NG Build Error
According to API Reference, I have to set the uint8array formatted value as the value_data. But I have no idea about converting from unit to unit8array.
API Reference
http://ezoelectro.narod.ru/doc-pdf/ble112/BLE_Stack_API_reference_v2.2.pdf
Can you help me? Thanks.