Open Home Automation Platform‎ > ‎HSO-100‎ > ‎BSP‎ > ‎

HSO-100 relay board

The HSO-100 relay board has the following components.
  • One NC/NO two state relay
  • One COM/A/B three state relay
  • Three digital input
  • Five digital output
These devices are controlled by GPIO of CPU and Holtek HT46RU22.

 FunctionChip     
 PIN      driver pin no
 two state relay
 HT46RU22 PA2 2
 Three state relay
 HT46RU22 PB6/PB70x16,0x17
(0,0)-->off
(1,0)-->A
(0,1)-->B
 DI1CPUA66    
 DI2CPU     
A5
5
 DI3CPU
A4
4
 DO1HT46RU22
B5
0x15
 DO2HT46TU22
B4
0x14
 DO3HT46RU22
A1
1
 DO4HT46RU22
B0
0x10
 DO5CPU
A3
3
 Factory default button
CPU
B26
0x3a

The device for the GPIO of the CPU is /dev/star_gpio.

The device file for the GPIO of the HT46RU22 is /dev/ht_gpio.

Both device file can be controlled by write the command to the device file. The format of the command is

Select pin as GPIO pin

This command is valid for the CPU only. It will setup the pin as GPIO pin instead of the alternative function.

 'g' pin


Setup the pin as input/output pin

Setup the pin as an input pin.

 'i'pin
 'o'pin


Setup the ping value as '1' or '0'


 '1'pin
 '0'pin


Read input pin


Current driver does not provide capability to read the input pin directly. However, we can use the ioctl to monitor the ping.

[To be finsihed]

Comments