Phase 1 of the Workabout MX inventory demo: read UPC barcodes from the scanner and display them, flagging UPC-A validity. No database yet (that is Phase 2).
New module code/inventory/:
upc.c/.h - UPC-A check-digit validation. Pure C, no PLIB deps, unit-testable on any host.
bcode.c/.h - barcode input over the serial port. On the Workabout the module decodes in hardware and delivers RS232, so a scan is read from TTY:D (top internal slot = port D) with standard PLIB serial I/O. Includes a line assembler that accumulates bytes to a terminator.
scan.c - the demo. Asynchronous wait on the scanner (TTY:D) and keyboard (CON:) via p_ioc/p_iowait: a scan is validated and printed, Esc quits.
scan.pr - TopSpeed project (tsc /m scan), compiles the three modules and links scan.img.
README.md - build, design, and the on-device points to confirm.
Written against the SDK docs now in docs/ (Workabout Programming Guide, PLIB Reference); it could not be compiled or run here. The likely on-device tuning points are called out in the README and in comments: serial line settings, the barcode terminator (BCODE_TERM, default CR), the Esc key code, and CON: async-read behaviour.
Phase 2 (DBF inventory: UPC + quantity + name, add/consume) will follow once the scan path is confirmed on the device.
Phase 1 of the Workabout MX inventory demo: read UPC barcodes from the scanner and display them, flagging UPC-A validity. No database yet (that is Phase 2).
New module `code/inventory/`:
- `upc.c/.h` - UPC-A check-digit validation. Pure C, no PLIB deps, unit-testable on any host.
- `bcode.c/.h` - barcode input over the serial port. On the Workabout the module decodes in hardware and delivers RS232, so a scan is read from `TTY:D` (top internal slot = port D) with standard PLIB serial I/O. Includes a line assembler that accumulates bytes to a terminator.
- `scan.c` - the demo. Asynchronous wait on the scanner (`TTY:D`) and keyboard (`CON:`) via `p_ioc`/`p_iowait`: a scan is validated and printed, Esc quits.
- `scan.pr` - TopSpeed project (`tsc /m scan`), compiles the three modules and links `scan.img`.
- `README.md` - build, design, and the on-device points to confirm.
Written against the SDK docs now in `docs/` (Workabout Programming Guide, PLIB Reference); it could not be compiled or run here. The likely on-device tuning points are called out in the README and in comments: serial line settings, the barcode terminator (`BCODE_TERM`, default CR), the Esc key code, and `CON:` async-read behaviour.
Phase 2 (DBF inventory: UPC + quantity + name, add/consume) will follow once the scan path is confirmed on the device.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Phase 1 of the Workabout MX inventory demo: read UPC barcodes from the scanner and display them, flagging UPC-A validity. No database yet (that is Phase 2).
New module
code/inventory/:upc.c/.h- UPC-A check-digit validation. Pure C, no PLIB deps, unit-testable on any host.bcode.c/.h- barcode input over the serial port. On the Workabout the module decodes in hardware and delivers RS232, so a scan is read fromTTY:D(top internal slot = port D) with standard PLIB serial I/O. Includes a line assembler that accumulates bytes to a terminator.scan.c- the demo. Asynchronous wait on the scanner (TTY:D) and keyboard (CON:) viap_ioc/p_iowait: a scan is validated and printed, Esc quits.scan.pr- TopSpeed project (tsc /m scan), compiles the three modules and linksscan.img.README.md- build, design, and the on-device points to confirm.Written against the SDK docs now in
docs/(Workabout Programming Guide, PLIB Reference); it could not be compiled or run here. The likely on-device tuning points are called out in the README and in comments: serial line settings, the barcode terminator (BCODE_TERM, default CR), the Esc key code, andCON:async-read behaviour.Phase 2 (DBF inventory: UPC + quantity + name, add/consume) will follow once the scan path is confirmed on the device.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.