{"id":15060506,"url":"https://github.com/sizigi/lp5562","last_synced_at":"2025-04-10T05:51:10.504Z","repository":{"id":143887795,"uuid":"93845769","full_name":"sizigi/lp5562","owner":"sizigi","description":"quick and dirty assembler for the LP5562 LED Driver","archived":false,"fork":false,"pushed_at":"2017-06-13T03:21:03.000Z","size":2151,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T14:08:08.609Z","etag":null,"topics":["assembly","nearley","texas-instruments","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sizigi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-09T10:04:17.000Z","updated_at":"2023-11-29T08:32:13.000Z","dependencies_parsed_at":"2023-07-02T13:15:15.487Z","dependency_job_id":null,"html_url":"https://github.com/sizigi/lp5562","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"61a750cb238075fe81a32a80a974957850987f09"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sizigi%2Flp5562","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sizigi%2Flp5562/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sizigi%2Flp5562/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sizigi%2Flp5562/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sizigi","download_url":"https://codeload.github.com/sizigi/lp5562/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","nearley","texas-instruments","typescript"],"created_at":"2024-09-24T22:59:41.818Z","updated_at":"2025-04-10T05:51:10.470Z","avatar_url":"https://github.com/sizigi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/lp5562.svg)](https://badge.fury.io/js/lp5562)\n\n# LP5562\n\nThis package is a quick and dirty assembler for the [Texas Instruments LP5562][lp5562]. Package is primarily written so that an open-source toolchain can be provided for the LED controller used in the [keyswitch.one][kso] project.\n\n## Usage\n\nFirst install via npm:\n\n    npm install --save lp5562\n\nThen include it in your project\n\n```typescript\n// if using typescript or ES6 modules\nimport {assemble} from 'lp5562'\n\n// or if using ES5\nvar assemble = require('lp5562').assemble;\n```\n\nTypescript definitions are included in the package. The function's signature is:\n\n### `assemble(program : string) : Uint16Array`\n\nwhere `program` is the string representation of the assembly program, and the resulting `Uint16Array` is an array of 48 16-bit WORDs representing the memory map of LP5562's program space.\n\n```typescript\nassemble(`\n  .engine1\n  set_pwm 255\n\n  flash:\n    ramp 200, -128\n    ramp 200, 128\n    branch 5, flash\n\n  ramp 200, -128\n  ramp 200, -127\n  end, i\n`);\n```\n\nProduces:\n\n    Uint16Array[ 65344, 65283, 32515, 33186, 65283, 65027, 208, 0, 0, 0, ... 0 ]\n\nAll data is provided in big-endian format (as the LP5562 is an 8-bit device). Feed the `Uint16Array#buffer` to a `Uint8Array` or use a `DataView` if you need a different data representation.\n\n## Grammar\n\nFor the assembly language spec, see the [grammar](src/lib/grammar.ne). As a rule of thumb, all instructions that work on the official assembler provided with the evaluation module should work here as well. See §3.4.1 and §3.4.2 in the [EVM docs](docs/snvu203a.pdf) for syntax and parameters.\n\n## Contributing\n\nThis project is MIT Licensed. Pull requests welcome. Changes documented in [CHANGELOG.md](CHANGELOG.md).\n\n[lp5562]: http://www.ti.com/product/LP5562\n[kso]: http://keyswitch.one\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsizigi%2Flp5562","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsizigi%2Flp5562","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsizigi%2Flp5562/lists"}