diff options
author | Jorawar Singh | 2017-06-30 11:28:58 +0530 |
---|---|---|
committer | Jorawar Singh | 2017-06-30 11:28:58 +0530 |
commit | aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9 (patch) | |
tree | be1db2f0453859eca8b4ae6e18c90baae68cc2bc /macros/Hardware/AVR/AVRUARTSetup.sci | |
parent | b33afdb2311fbe8aad4c5c614c6098585fe2d279 (diff) | |
download | Scilab2C_fossee_old-aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9.tar.gz Scilab2C_fossee_old-aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9.tar.bz2 Scilab2C_fossee_old-aef4e8398f2b1848b0e4cdd9580dbbe93e4006f9.zip |
Help files, modified Raspberry Pi code conversion
Diffstat (limited to 'macros/Hardware/AVR/AVRUARTSetup.sci')
-rw-r--r-- | macros/Hardware/AVR/AVRUARTSetup.sci | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/macros/Hardware/AVR/AVRUARTSetup.sci b/macros/Hardware/AVR/AVRUARTSetup.sci index 32e5db8..6ecf2a0 100644 --- a/macros/Hardware/AVR/AVRUARTSetup.sci +++ b/macros/Hardware/AVR/AVRUARTSetup.sci @@ -10,29 +10,34 @@ function AVRUARTSetup(mode, baudrate, stopbits, parity) // Function to Setup Serial Communication i.e UART or USART in ATmega16. +// +// Parameters +// mode : integer, from 0 to 2 +// baudrate : Enter one of the following available baudrates (2400 , 4800 , 9600 , 14400 , 19200 , 28800 , 38400 , 57600 , 768000 , 115200 , 230400 , 250000 , 1000000) +// stopbits : integer, (0 for one stopbit) or (1 for two stopbits) +// parity : integer, from 0 to 2 +// // Description // This function Setup the UART or USART for Serial Communicaion between ATmega16 // and different micro controllers or between ATmega16 and Computer. -// -// Parameters -// mode : -// 0 for Asynchronous Normal mode -// 1 for Asynchronous Double Speed mode -// 2 for Synchronous mode -// -// baudrate : Enter one of the following available baudrates -// 2400 , 4800 , 9600 , 14400 , 19200 , 28800 , 38400 , 57600 , -// 768000 , 115200 , 230400 , 250000 , 1000000 . // -// stopbits : -// 0 for one stopbit -// 1 for two stopbits +// mode can take values: +// <itemizedlist> +// <listitem><para>0 for Asynchronous Normal mode</para></listitem> +// <listitem><para>1 for Asynchronous Double Speed mode</para></listitem> +// <listitem><para>2 for Synchronous mode</para></listitem> +// </itemizedlist> +// +// parity can take values: +// <itemizedlist> +// <listitem><para>0 for parity disabled</para></listitem> +// <listitem><para>1 for even parity</para></listitem> +// <listitem><para>2 for odd parity</para></listitem> +// </itemizedlist> +// +// This is curretly dummy function. It provides no functionality but is required +// for providing support for generating C code for AVR. // -// parity : -// 0 for parity disabled -// 1 for even parity -// 2 for odd parity -// //Examples // AVRUARTSetup(0,9600,0,0); //This function will enable UART Communication for ATmega16 // with 9600 as baudrate,one stop bit and parity disabled @@ -43,8 +48,7 @@ function AVRUARTSetup(mode, baudrate, stopbits, parity) // Authors // Ashish Kamble // -// This is curretly dummy function. It provides no functionality but is required -// for providing support for generating C code for AVR. + if(mode>=3) then disp("Error : Invalid input argument ''mode'' in AVRUARTSetup function."); end |