BUFSPACE
(Difference between revisions)
(Created page with "= <span class="f_Header">Action</span> = Returns the amount of free space of a serial buffer. <span style="font-family: Arial;"> </span> <span style="font-family: Aria...") |
|||
Line 60: | Line 60: | ||
= <span class="f_Header">Example</span> = | = <span class="f_Header">Example</span> = | ||
− | < | + | <br/><source lang="bascomavr"> |
+ | '--------------------------------------------------------- | ||
+ | NONE | ||
+ | </source><br/>{{Languages}} | ||
− | + | [[Category:BASCOM Language Reference]] | |
− | + | ||
− | + |
Revision as of 13:54, 7 February 2013
Contents |
Action
Returns the amount of free space of a serial buffer.
Syntax
Var = BufSpace(n)
Remarks
Var |
A word or integer variable that is assigned with the free buffer space. |
N |
A constant in the range from 0-3. A value of 0 : output buffer first UART A value of 1 : input buffer first UART A value of 2 : output buffer second UART A value of 3 : input buffer second UART |
While serial buffers are great because you do not have to wait/block the processor, the buffer can become full when the micro has no time to empty the buffer. With the bufspace() function you can determine if there is still room in the buffer.
See Also
Example
'--------------------------------------------------------- NONE
Languages | English • Deutsch |
---|