HP85 GPIB Disk Emulator  1.0
HP85GPIBDiskEmulator
Functions
printer.h File Reference

HPGL printer capture code for HP85 disk emulator project for AVR. More...

#include <user_config.h>

Go to the source code of this file.

Functions

void printer_open (char *name)
 Open a file to receive plot data using POSIX functions. More...
 
void printer_init (void)
 Initialize plotter structures and state. More...
 
void printer_close (void)
 Close current plot file and reset states. More...
 
int receive_plot_flush (void)
 Write Plotter data and flush. More...
 
void printer_buffer (uint16_t val)
 Buffer Plotter data and flush when buffer is full. More...
 
int PRINTER_COMMANDS (uint8_t ch)
 GPIB Secondary Command Printer commands. More...
 
void plot_echo (int gpib_address)
 

Detailed Description

HPGL printer capture code for HP85 disk emulator project for AVR.

Edit History
  • [1.0] [Mike Gore] Initial revision of file.
Copyright © 2014-2020 Mike Gore, All rights reserved. GPL
See also
http://github.com/magore/hp85disk
http://github.com/magore/hp85disk/COPYRIGHT.md for Copyright details

Definition in file printer.h.

Function Documentation

◆ plot_echo()

void plot_echo ( int  gpib_address)

◆ printer_buffer()

void printer_buffer ( uint16_t  val)

Buffer Plotter data and flush when buffer is full.

  • Uses POSIX FatFs wrappers.
See also
posix.c
posix.h
Returns
void

Definition at line 186 of file printer.c.

Referenced by gpib_task().

◆ printer_close()

void printer_close ( )

Close current plot file and reset states.

  • Verify that polt file is open before attempting close.
  • Uses POSIX FatFs wrappers.
See also
posix.c
posix.h
Returns
void FYI: for the HP54645D plots end with: pd;pu;pu;sp0; This gets called

Definition at line 118 of file printer.c.

Referenced by free_device(), GPIB(), gpib_init_devices(), listen_cleanup(), and printer_open().

◆ PRINTER_COMMANDS()

int PRINTER_COMMANDS ( uint8_t  ch)

GPIB Secondary Command Printer commands.

Todo:
Fully emulated plotter response.
Returns
0

Definition at line 227 of file printer.c.

Referenced by GPIB_COMMANDS().

◆ printer_init()

void printer_init ( )

Initialize plotter structures and state.

  • Only called once after power on by main().
    Returns
    void

Definition at line 98 of file printer.c.

Referenced by main(), and printer_close().

◆ printer_open()

void printer_open ( char *  name)

Open a file to receive plot data using POSIX functions.

  • Uses POSIX FatFs wrappers.
See also
posix.c
posix.h
Returns
void

Definition at line 43 of file printer.c.

Referenced by GPIB_LISTEN(), and GPIB_TALK().

◆ receive_plot_flush()

int receive_plot_flush ( )

Write Plotter data and flush.

  • Uses POSIX FatFs wrappers.
See also
posix.c
posix.h
printer_buffer()
Returns
file handle

sync filesystem after every write

Definition at line 151 of file printer.c.

Referenced by printer_buffer(), and printer_close().