serial_hw_int_cts

serial_hw_int_cts.jal. Interrupt driven buffered serial interface with flow control.

Author Rob Hamerling, Copyright (c) 2008..2008, all rights reserved.
Adapted-by Joep Suijs
Compiler =2.4h

Description

Serial communications
             - receive and transmit data transfer is interrupt driven
             - receive and transmit data transfer uses circular buffers
             - automatic CTS flow control with spare free space for FiFo buffer


Dependencies


Summary

Global variables/contants

Procedures

Private

Functions


API details

Global variables/contants

Procedures

Private

Functions

  • serial_hw_read(byte out data) return bit

     Return byte (if any) from circular receive buffer for UART
    
     input:   nothing
    
     output:  received byte (if any)
    
     returns: true  when byte returned
              false if no byte available
    
     notes: - Rises CTS when receive buffer has more than 
              bytes free space after delivering byte to caller.
    
    
    

  • serial_hw_data'get() return byte

    No documentation found

  • serial_receive_byte(byte out data) return bit

    No documentation found

  • serial_send_byte(byte in data) return byte

     Put a single byte in circular transmit buffer for UART
    
     input:   byte to transmit
    
     returns: transmitted byte (or 0x00 when data discarded)
    
     notes: - Activates transmit interrupt handler when data buffered
            - When buffer full act as indicated in 'serial_overflow_discard'
              * TRUE:  discard data
                       (and return 0x00 as data byte)
              * FALSE: wait for free buffer space
                       (returns only after data has been stored in buffer)
    
    
    


Related samples

Here are the list of samples which use this library:

sample16f88_serial_hw_int_cts_echo.jal