Classes | |
| class | Serial |
| class | GPIO |
Functions | |
| Sub | __hbbr_mod_set_last_error (err As Integer) |
| Function | __hbbr_mod_get_last_error () |
| Function Serial | Configure (ByVal optionmask As Integer, ByVal options As Integer) As Integer |
| Function Serial | Reset () |
| Function Serial | Open () |
| Function Serial | Close () |
| Function Serial | Write (ByVal byte As Byte) As Integer |
| Function Serial | WriteString (ByRef str$ As String, ByVal count As Integer) As Integer |
| Function Serial | WriteLine (ByRef str$ As String) As Integer |
| Function Serial | Read (ByRef c As Byte) As Integer |
| Function Serial | ReadString (ByRef str$ As String, ByVal count As Integer) As Integer |
| Function Serial | ReadLine (ByRef str$ As String) As Integer |
| Function GPIO | Configure (ByVal pin As Integer) As Integer |
| Function GPIO | Set (ByVal pin As Integer) |
| Function GPIO | Clr (ByVal pin As Integer) |
| Function GPIO | Pin (ByVal pin As Integer) As Integer |
| Function GPIO | PortSet (ByVal port As Integer, ByVal pins As Integer) |
| Function GPIO | PortClr (ByVal port As Integer, ByVal pins As Integer) |
| Function GPIO | Port (ByVal port As Integer) As Integer |
Variables | |
| Serial | Serial0 |
| Serial | Serial1 |
| CONST | BAUD |
| CONST | BAUD_150 |
| CONST | BAUD_300 |
| CONST | BAUD_1200 |
| CONST | BAUD_2400 |
| CONST | BAUD_4800 |
| CONST | BAUD_9600 |
| CONST | BAUD_19200 |
| CONST | BAUD_38400 |
| CONST | BAUD_57600 |
| CONST | BAUD_115200 |
| CONST | DATABITS |
| CONST | DATABITS_5 |
| CONST | DATABITS_6 |
| CONST | DATABITS_7 |
| CONST | DATABITS_8 |
| CONST | DATABITS_9 |
| CONST | PARITY |
| CONST | PARITY_NONE |
| CONST | PARITY_ODD |
| CONST | PARITY_EVEN |
| CONST | PARITY_MARK |
| CONST | PARITY_SPACE |
| CONST | STOPBITS |
| CONST | STOPBITS_0 |
| CONST | STOPBITS_1 |
| CONST | STOPBITS_1_5 |
| CONST | STOPBITS_2 |
| CONST | FLOW |
| CONST | FLOW_NONE |
| CONST | FLOW_RTSCTS |
| CONST | FLOW_XONXOFF |
| CONST | ERROR_SERIAL_UART |
| CONST | ERROR_SERIAL_CONFIG |
| CONST | ERROR_SERIAL_RECEIVE |
| CONST | ERROR_SERIAL_SEND |
| CONST | ERROR_SERIAL_BUFFER |
| CONST | ERROR_SERIAL_TIMEOUT |
| CONST | ERROR_SERIAL_RXTIMEOUT |
| CONST | ERROR_SERIAL_TXTIMEOUT |
| CONST | ERROR_SERIAL_PARITY |
| CONST | ERROR_SERIAL_OVERRUN |
| CONST | ERROR_SERIAL_FRAMING |
| CONST | ERROR_SERIAL_RXFIFO |
| GPIO | IO |
| CONST | P0_0 |
| CONST | P0_0_IN |
| CONST | P0_0_OUT |
| CONST | P1_31 |
| CONST | P1_31_IN |
| CONST | P1_31_OUT |
| CONST | ERROR_GPIO_IO |
| CONST | ERROR_GPIO_CONFIG |
| CONST | ERROR_GPIO_BADPORT |
| CONST | ERROR_GPIO_BADPIN |
| CONST | ERROR_GPIO_BADPINFUN |
| CONST | PIN_PULLUP_ENABLE |
| CONST | PIN_GLITCH_FILTER_ENABLE |
| CONST | PIN_INT_ENABLE |
| Function __hbbr_mod_get_last_error | ( | ) |
| Sub __hbbr_mod_set_last_error | ( | err As | Integer | ) |
| Function Serial Close | ( | ) |
Close serial device
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded |
Function Serial.Close() As Integer
| Function GPIO Clr | ( | ByVal pin As | Integer | ) |
| Function GPIO Configure | ( | ByVal pin As | Integer | ) |
Configure IO pin
| [in] | pin | Integer |
| <= | 0 - failed, return value is an error code | |
| > | 1 - succeeded |
Function GPIO.Configure(ByVal pin As Integer) As Integer
| Function Serial Configure | ( | ByVal optionmask As | Integer, | |
| ByVal options As | Integer | |||
| ) |
Configure serial device
| [in] | optionmask | Integer |
| [in] | options | Integer |
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded |
Function Serial.Configure(ByVal optionmask As Integer, ByVal options As Integer) As Integer
| Function Serial Open | ( | ) |
Open serial device
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded |
Function Serial.Open() As Integer
| Function GPIO Pin | ( | ByVal pin As | Integer | ) |
Read pin voltage level
| [in] | pin | Integer |
| 0 | - low voltage level | |
| 1 | - high voltage level |
Function GPIO.Pin(ByVal pin As Integer) As Integer
| Function GPIO Port | ( | ByVal port As | Integer | ) |
Read port pins voltage level
| [in] | port | Integer |
| 0 | - low voltage level | |
| 1 | - high voltage level |
Function GPIO.Port(ByVal port As Integer) As Integer
| Function GPIO PortClr | ( | ByVal port As | Integer, | |
| ByVal pins As | Integer | |||
| ) |
Clear port pins (low voltage level)
| [in] | port | Integer |
| [in] | pins | Integer, pin bitmask |
Function GPIO.PortClr(ByVal port As Integer, ByVal pins As Integer)
| Function GPIO PortSet | ( | ByVal port As | Integer, | |
| ByVal pins As | Integer | |||
| ) |
Set port pins (high voltage level)
| [in] | port | Integer |
| [in] | pins | Integer, pin bitmask |
Function GPIO.PortSet(ByVal port As Integer, ByVal pins As Integer)
| Function Serial Read | ( | ByRef c As | Byte | ) |
Read byte from serial device.
| [in] | c | Byte |
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded, return value is actual number of bytes written |
Function Serial.Read(ByRef c As Byte) As Integer
| Function Serial ReadLine | ( | ByRef str$ As | String | ) |
Read bytes from serial device into the string until terminated by the end of line marker or maximum string length is reached. Characters marking end of line are stored in the string.
| [in] | str$ | String |
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded, return value is actual number of bytes read |
Function Serial.ReadLine(ByRef str$ As String) As Integer
| Function Serial ReadString | ( | ByRef str$ As | String, | |
| ByVal count As | Integer | |||
| ) |
Read bytes from serial device into the string up to a specified count or maximum string length if count is 0 or more then maximum string length.
| [in] | str$ | String |
| [in] | count | Integer, if 0 then read up to maximum string length |
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded, return value is actual number of bytes read |
Function Serial.ReadString(ByRef str$ As String, ByVal count As Integer) As Integer
| Function Serial Reset | ( | ) |
Reset serial device.
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded |
Function Serial.Reset() As Integer
| Function GPIO Set | ( | ByVal pin As | Integer | ) |
| Function Serial Write | ( | ByVal byte As | Byte | ) |
Write byte to serial device
| [in] | c | Byte |
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded, return value is actual number of bytes written |
Function Serial.Write(ByVal byte As Byte) As Integer
| Function Serial WriteLine | ( | ByRef str$ As | String | ) |
Write characters from the input string to the serial device. End of line marker is written at the end.
| [in] | str$ | String |
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded, return value is actual number of bytes written |
Function Serial.WriteLine(ByRef str$ As String) As Integer
| Function Serial WriteString | ( | ByRef str$ As | String, | |
| ByVal count As | Integer | |||
| ) |
Write characters from the string up to the count to the serial device.
| [in] | str$ | String |
| [in] | count | Integer, if 0 then entire string is written |
| <= | 0 - failed, return value is an error code | |
| >= | 1 - succeeded, return value is actual number of bytes written |
Function Serial.WriteString(ByRef str$ As String, ByVal count As Integer) As Integer
| CONST BAUD |
Flag to set baud rate
| CONST BAUD_115200 |
115200 baud rate
| CONST BAUD_1200 |
1200 baud rate
| CONST BAUD_150 |
150 baud rate
| CONST BAUD_19200 |
19200 baud rate
| CONST BAUD_2400 |
2400 baud rate
| CONST BAUD_300 |
300 baud rate
| CONST BAUD_38400 |
38400 baud rate
| CONST BAUD_4800 |
4800 baud rate
| CONST BAUD_57600 |
57600 baud rate
| CONST BAUD_9600 |
9600 baud rate
| CONST DATABITS |
Flag to set data bits
| CONST DATABITS_5 |
5 data bits
| CONST DATABITS_6 |
6 data bits
| CONST DATABITS_7 |
7 data bits
| CONST DATABITS_8 |
8 data bits
| CONST DATABITS_9 |
9 data bits
| CONST ERROR_GPIO_BADPIN |
GPIO bad pin number error
| CONST ERROR_GPIO_BADPINFUN |
GPIO bad pin function error
| CONST ERROR_GPIO_BADPORT |
GPIO bad port number error
| CONST ERROR_GPIO_CONFIG |
GPIO configuration error
| CONST ERROR_GPIO_IO |
GPIO error
| CONST ERROR_SERIAL_BUFFER |
UART buffer error
| CONST ERROR_SERIAL_CONFIG |
UART configuration error
| CONST ERROR_SERIAL_FRAMING |
UART overrun error
| CONST ERROR_SERIAL_OVERRUN |
UART overrun error
| CONST ERROR_SERIAL_PARITY |
UART parity error
| CONST ERROR_SERIAL_RECEIVE |
UART receive error
| CONST ERROR_SERIAL_RXFIFO |
UART receive fifo error
| CONST ERROR_SERIAL_RXTIMEOUT |
UART receive timeout error
| CONST ERROR_SERIAL_SEND |
UART send error
| CONST ERROR_SERIAL_TIMEOUT |
UART timeout error
| CONST ERROR_SERIAL_TXTIMEOUT |
UART transmit timeout error
| CONST ERROR_SERIAL_UART |
UART error
| CONST FLOW |
Flag set flow control
| CONST FLOW_NONE |
no flow control
| CONST FLOW_RTSCTS |
hardware flow control
| CONST FLOW_XONXOFF |
XON/XOFF flow control
| CONST P0_0 |
Const value for pin P0.0 used to refer to the pin except for configuration purpose
| CONST P0_0_IN |
Const value for pin P0.0 used to configure as input only
| CONST P0_0_OUT |
Const value for pin P0.0 used to configure as output only
| CONST P1_31 |
Const value for pin P1.31 used to refer to the pin except for configuration purpose
| CONST P1_31_IN |
Const value for pin P1.31 used to configure as input only
| CONST P1_31_OUT |
Const value for pin P1.31 used to configure as output only
| CONST PARITY |
Flag to set parity
| CONST PARITY_EVEN |
parity even
| CONST PARITY_MARK |
parity mark
| CONST PARITY_NONE |
no parity
| CONST PARITY_ODD |
parity odd
| CONST PARITY_SPACE |
parity space
| CONST PIN_GLITCH_FILTER_ENABLE |
GPIO enable input glitch filter AT91SAM7S only
| CONST PIN_INT_ENABLE |
GPIO enable input interrupt AT91SAM7S only
| CONST PIN_PULLUP_ENABLE |
GPIO enble pull-up AT91SAM7S only
| CONST STOPBITS |
Flag to set stop bits
| CONST STOPBITS_0 |
no stop bits
| CONST STOPBITS_1 |
1 stop bit
| CONST STOPBITS_1_5 |
1.5 stop bits
| CONST STOPBITS_2 |
2 stop bits