diff options
author | siddhu8990 | 2017-04-19 11:56:09 +0530 |
---|---|---|
committer | siddhu8990 | 2017-04-19 11:56:09 +0530 |
commit | 645c51daadc9a5c9374b0465ded05f84bca65183 (patch) | |
tree | a2eac389b3e3e67c9182e8369b50eb78b5e698cb /2.3-1/macros/Hardware | |
parent | 160eb350837f8cd3cdb0943b5929e11f44036826 (diff) | |
download | Scilab2C-645c51daadc9a5c9374b0465ded05f84bca65183.tar.gz Scilab2C-645c51daadc9a5c9374b0465ded05f84bca65183.tar.bz2 Scilab2C-645c51daadc9a5c9374b0465ded05f84bca65183.zip |
Copyright message updated in added files and libraries separated in 'thirdparty' folder
Diffstat (limited to '2.3-1/macros/Hardware')
27 files changed, 185 insertions, 9 deletions
diff --git a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin Binary files differindex 0c64927f..a70999c0 100644 --- a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin +++ b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.bin diff --git a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci index a791f1e7..3e6397b2 100644 --- a/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci +++ b/2.3-1/macros/Hardware/RasberryPi/GetRPISupportFunctions.sci @@ -7,8 +7,17 @@ function RPiSupportFunctions = GetRPISupportFunctions() // // Output data: // None +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in // -// Author: Siddhesh Wani // ----------------------------------------------------------------- RPiSupportFunctions = [ diff --git a/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.bin b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.bin Binary files differindex 728e3d80..11533d3e 100644 --- a/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.bin +++ b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.bin diff --git a/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci index 647b0c85..c6a2c365 100644 --- a/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci +++ b/2.3-1/macros/Hardware/RasberryPi/IsRPISupportFunction.sci @@ -9,7 +9,17 @@ function Output = IsRPISupportFunction(FunName) // Output: True or False depending whether given function is a RPi // support functions or not // -// Author: Siddhesh Wani +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Siddhesh Wani +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// // ----------------------------------------------------------------- //Get list of supported functions for AVR diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci index 730755b7..bbb0bb3b 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMicro.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_DelayMicro(time) // Function to insert some delay in code execution. // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.bin Binary files differindex bb8279ec..b6eeb30b 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.bin +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.bin diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci index c5080dd8..13b79625 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DelayMilli.sci @@ -1,5 +1,13 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_DelayMilli(time) -// Function to insert some delay in code execution. +// Function to insert some delay in milli seconds in code execution. // // Calling Sequence // RPI_DelayMilli(time) @@ -8,7 +16,7 @@ function RPI_DelayMilli(time) // time: time(milliseconds) for which execution is to be delayed // // Description -// this function can be used for insertig execution delays. 'time' should be +// This function can be used for insertig execution delays. 'time' should be // specified in milliseconds. If more resolution is required, use 'RPI_DelayMicro' // for inserting delay in microseconds. // Note: Delay inserted by this function is not accurate, but depedent on diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci index 4df03f67..781c49c8 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalIn.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function state = RPI_DigitalIn(pin) // Function to read current state on digital pins. // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.bin Binary files differindex d6b6b7bf..b7ad06e5 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.bin +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.bin diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci index 4836f54f..dde3c934 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalOut.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_DigitalOut(pin, state) // Function to output desired state on digital pins. // @@ -20,8 +28,17 @@ function RPI_DigitalOut(pin, state) // Authors // Siddhesh Wani // +// ----------------------------------------------------------------- +//Pins of header P1 which can be used as GPIO +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; + +PinIsGPIO = members(pin, supported_pins); //Check if output pin supports GPIO -// This is curretly dummy function. It provides no functionality but is required -// for providing support for generating C code for RPi. +//If given pin does not support GPIO functionality, raise the error +if(PinIsGPIO == 0) + error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); +end +state = 1; endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin Binary files differindex 1f20deb2..1ac5b582 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.bin diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci index 460a4174..01d6e07d 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_DigitalSetup.sci @@ -22,7 +22,8 @@ function RPI_DigitalSetup(pin, direction) // Siddhesh Wani // ----------------------------------------------------------------- //Pins of header P1 which can be used as GPIO -supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26] +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO @@ -30,4 +31,6 @@ PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO if(PinIsGPIO == 0) error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); end +state = 1; + endfunction diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_GetMicros.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMicros.sci index 7f825efd..6c4db57a 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_GetMicros.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMicros.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function Micros = RPI_GetMicros() // Function to get time in Microsecond since first setup function called. // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_GetMillis.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMillis.sci index b83f5fea..c034a705 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_GetMillis.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_GetMillis.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function Millis = RPI_GetMillis() // Function to get time in millisecond since first setup function called. // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci index 3c050306..8448d364 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetClock.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMSetClock(clock_divisor) // Function to set PWM clock. PWM clock frequency is 19.2MHz, which can be reduced // using suitable clock_divisor (1 to 2048, powers of 2) diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci index 2ab697bc..57b82601 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetMode.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMSetMode(pwm_mode) // Function to set PWM mode. Two modes are available - balanced and mark/space // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci index cb7dd67d..c2075e2d 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMSetRange.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMSetRange(range_val) // Function to set range value for PWM. Range value along with clock divisor // decides pwm frequency. Range value must be less than 1024 diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci index 9f9f7977..dba5e674 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_HardPWMWrite.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_HardPWMWrite(pin,value) // Function to change pwm duty on specified pin. Hardware PWM is available // only on pin 12. So, only '12' should be provided as pin diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.bin b/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.bin Binary files differindex a6c0bd98..ddeff684 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.bin +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.bin diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.sci index 2de7d9e8..c2354c1f 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_PinISR.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_PinISR(pin, edgetype, fn) // Function to assign a function to be run when an interrupt occurs on // specified pin. @@ -30,7 +38,8 @@ function RPI_PinISR(pin, edgetype, fn) // for providing support for generating C code for RPi. //Pins of header P1 which can be used as GPIO -supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26] +supported_pins = [3,5,7,8,10,11,12,13,15,16,18,19,21,22,23,24,26,27,28,29,... + 31,31,33,35,36,37,38,40]; PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO @@ -38,7 +47,7 @@ PinIsGPIO = members(pin, supported_pins); //Check if input pin supports GPIO if(PinIsGPIO == 0) error(9999, 'SCI2CERROR: Given pin number doesnot support GPIO functionality.'); end -EdgeTypeSupported = members(edgetype,[1 2 3]) +EdgeTypeSupported = members(edgetype,[1 2 3]); if(EdgeTypeSupported == 0) error(9999, 'SCI2CERROR: Given edgetype is incorrect. Please specify correct edgetype from [1,2,3]') diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialClose.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialClose.sci index 0d393f39..f27dd432 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialClose.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialClose.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_SerialClose(fd) // Function to close serial port specified by file descriptor. // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialFlush.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialFlush.sci index ffef70b4..9bab386f 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialFlush.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialFlush.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function data = RPI_SerialGetChar(fd) // Function to read data from specified serial port // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci index 0271449d..a26e5b97 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialGetChar.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function data = RPI_SerialGetChar(fd) // Function to read data from specified serial port // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci index 82051d66..769b21d2 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendChar.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_SerialSendChar(fd, data) // Function to send 8-bit char through serial port. // diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendData.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendData.sci index 6bfe80d1..c05852b1 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendData.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSendData.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function RPI_SerialSendData(fd, data) // Function to send data through serial port. Data can be of any datatype and // can be scalar or matrix diff --git a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSetup.sci b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSetup.sci index 25a70a38..0f266610 100644 --- a/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSetup.sci +++ b/2.3-1/macros/Hardware/RasberryPi/RPI_SerialSetup.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function fd = RPI_SerialSetup(port, baudrate) // Function to setup serial port. // diff --git a/2.3-1/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci b/2.3-1/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci index 5a291569..6eb29a1c 100644 --- a/2.3-1/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci +++ b/2.3-1/macros/Hardware/RasberryPi/u16RPISerialDataAvail.sci @@ -1,3 +1,11 @@ +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + function bytes = RPI_SerialDataAvail(fd) // Function to get number of data bytes available on serial port specified by // file descriptor |