Next Previous Contents

3.167 ser_close

Function

Close the port and disable interrupts

Header

serial.h

Declaration

unsigned char ser_close (void);

Description

Close the port by clearing buffers and disable interrupts.

Availability

cc65

See also

Other serial functions.

Example

#include <serial.h>

static void initialize(){
  struct ser_params params = {
    SER_BAUD_9600,
    SER_BITS_8,
    SER_STOP_1,
    SER_PAR_MARK,
    SER_HS_NONE
  };
  ser_install(lynx_comlynx); // This will activate the ComLynx
  CLI();
  ser_open(&params);
}


Next Previous Contents