Init(Kline,...)
Description
Initializes 1-Wire interface for data transfer and monitoring.
Syntax
Init(Kline, speed, pull_up_mode);
Parameters
Variable | Input |
|---|---|
| Speed (baud rate) can be one of the following: 9600 10400 (K-Line) 19200 57600 115200 |
| PullUpMode can either be: NoPullUp PullDown PullUp_5V PullUp_VCC. |
Returns
Return value | Return explanation |
SCRIPT_OPERATION_SUCCESS | Success |
SCRIPT_NO_ACCESS | Peripheral already initialized. |
Function call example
Kline initialization example
main()
{
Init(Kline, 9600, PullUp_5V);
for(;;)
{
Delay(1000);
}
}Notes and Warnings
WARNING: Do not initialize Kline on separate threads. In order to use Kline on separate threads first do DeInit on thread where it was previously initialized.