mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-09-19 16:46:11 -04:00
0.2.4 ParallelPrinter
This commit is contained in:
parent
804daaa289
commit
c6321536a7
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2013-2021 Rob Tillaart
|
||||
Copyright (c) 2013-2022 Rob Tillaart
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: ParallelPrinter.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.3
|
||||
// VERSION: 0.2.4
|
||||
// PURPOSE: parallel printer class that implements the Print interface
|
||||
// DATE: 2013-09-30
|
||||
// URL: https://github.com/RobTillaart/ParallelPrinter
|
||||
@ -13,6 +13,7 @@
|
||||
// 0.2.2 2021-01-14 update readme, add linefeed(), add keywords.txt
|
||||
// 0.2.3 2021-11-11 update Arduino-CI, readme,md
|
||||
// add isBusy();
|
||||
// 0.2.4 2021-12-23 update library.json, license, minor edits
|
||||
|
||||
|
||||
#include "ParallelPrinter.h"
|
||||
@ -168,3 +169,4 @@ void ParallelPrinter::sendByte(uint8_t c)
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: ParallelPrinter.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.3
|
||||
// VERSION: 0.2.4
|
||||
// PURPOSE: parallel printer class that implements the Print interface
|
||||
// DATE: 2013-09-30
|
||||
// URL: https://github.com/RobTillaart/ParallelPrinter
|
||||
@ -11,7 +11,7 @@
|
||||
#include "Arduino.h"
|
||||
|
||||
|
||||
#define PARALLELPRINTER_VERSION (F("0.2.3"))
|
||||
#define PARALLELPRINTER_VERSION (F("0.2.4"))
|
||||
|
||||
#define FORMFEED 12
|
||||
#define LINEFEED 10
|
||||
@ -54,6 +54,7 @@ public:
|
||||
void setStrobeDelay(uint16_t n = 2000) { _strobeDelay = n; };
|
||||
uint16_t getStrobeDelay() { return _strobeDelay; };
|
||||
|
||||
|
||||
private:
|
||||
// COMMUNICATION
|
||||
uint8_t _strobePin; // inform printer new data on the line.
|
||||
@ -79,3 +80,4 @@ private:
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -86,13 +86,18 @@ https://en.wikipedia.org/wiki/Parallel_port#Centronics
|
||||
|
||||
- update documentation
|
||||
- extend unit tests?
|
||||
- test more
|
||||
- extend simulator sketch
|
||||
- test more.
|
||||
- extend simulator sketch.
|
||||
- Make a front end of a parallel printer,
|
||||
- Accepts the clocked bytes and print them e.g. over serial.
|
||||
- derive e.g. an HP or an EPSON printer from this class.
|
||||
- special modes e.g. bold italic underline
|
||||
- special modes e.g. bold italic underline.
|
||||
- **write(uint8_t \* buf, uint8_t length)** should be added
|
||||
- might not really add to performance..
|
||||
- fix blocking TODO in sendByte
|
||||
|
||||
|
||||
|
||||
## Operation
|
||||
|
||||
See examples
|
||||
See examples.
|
||||
|
@ -1,11 +1,9 @@
|
||||
//
|
||||
// FILE: ParPrinter_test.ino
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.0
|
||||
// PURPOSE: demo
|
||||
// DATE: 2020-05-26
|
||||
// (c) : MIT
|
||||
//
|
||||
|
||||
|
||||
#include "ParallelPrinter.h"
|
||||
|
||||
@ -83,3 +81,4 @@ void test3()
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
//
|
||||
// FILE: PrinterSimulator.ino
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.0
|
||||
// PURPOSE: demo
|
||||
// DATE: 2020-06-24
|
||||
// (c) : MIT
|
||||
|
||||
|
||||
//
|
||||
// Simple parallel printer simulator, prints to serial...
|
||||
// version could be made with a shiftin register ....
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
//
|
||||
// FILE: Serial2ParPrinter.ino
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.1.1
|
||||
// PURPOSE: demo
|
||||
// DATE: 2020-05-26
|
||||
// (c) : MIT
|
||||
//
|
||||
|
||||
|
||||
#include "ParallelPrinter.h"
|
||||
|
||||
@ -32,3 +30,4 @@ void loop()
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
||||
|
@ -15,8 +15,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/ParallelPrinter.git"
|
||||
},
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*"
|
||||
"platforms": "*",
|
||||
"headers": "ParallelPrinter.h"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=ParallelPrinter
|
||||
version=0.2.3
|
||||
version=0.2.4
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Experimental (not complete) library to connect a parallel printer to Arduino.
|
||||
|
@ -38,12 +38,15 @@
|
||||
|
||||
unittest_setup()
|
||||
{
|
||||
fprintf(stderr, "PARALLELPRINTER_VERSION: %s\n", (char *) PARALLELPRINTER_VERSION);
|
||||
}
|
||||
|
||||
|
||||
unittest_teardown()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
unittest(test_new_operator)
|
||||
{
|
||||
@ -57,12 +60,10 @@ unittest(test_new_operator)
|
||||
}
|
||||
*/
|
||||
|
||||
// minimal
|
||||
|
||||
// minimal
|
||||
unittest(test_constructor_basic)
|
||||
{
|
||||
fprintf(stderr, "VERSION: %s\n", PARALLELPRINTER_VERSION);
|
||||
|
||||
ParallelPrinter PP;
|
||||
|
||||
PP.begin();
|
||||
@ -133,6 +134,7 @@ unittest(test_OutOfPaper)
|
||||
// assertTrue(PP.isOutOfPaper());
|
||||
}
|
||||
|
||||
|
||||
unittest_main()
|
||||
|
||||
// --------
|
||||
|
Loading…
Reference in New Issue
Block a user