Next Previous Contents

3.172 ser_open

Function

Open the port by setting the port parameters and enable interrupts

Header

serial.h

Declaration

unsigned char __fastcall__ ser_open (const struct ser_params* params);

Description

Open the port by setting the port parameters and enable interrupts.

Limits

  • The function is only available as fastcall function, so it may only be used in presence of a prototype.

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