franta-hg@29: /** franta-hg@29: * RGB assembler franta-hg@29: * Copyright © 2017 František Kučera (frantovo.cz) franta-hg@29: * franta-hg@29: * This program is free software: you can redistribute it and/or modify franta-hg@29: * it under the terms of the GNU General Public License as published by franta-hg@29: * the Free Software Foundation, either version 3 of the License, or franta-hg@29: * (at your option) any later version. franta-hg@29: * franta-hg@29: * This program is distributed in the hope that it will be useful, franta-hg@29: * but WITHOUT ANY WARRANTY; without even the implied warranty of franta-hg@29: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the franta-hg@29: * GNU General Public License for more details. franta-hg@29: * franta-hg@29: * You should have received a copy of the GNU General Public License franta-hg@29: * along with this program. If not, see . franta-hg@29: */ franta-hg@29: franta-hg@28: #pragma once franta-hg@28: franta-hg@28: // Standard commands franta-hg@28: franta-hg@28: /** franta-hg@28: * Skip to the given address. franta-hg@28: * parameter: address_t franta-hg@28: */ franta-hg@28: const command_t CMD_GOTO = 0x70; franta-hg@28: franta-hg@28: /** franta-hg@28: * Compare values on two addresses and go to one of given three addresses. franta-hg@28: * parameter: address_t a franta-hg@28: * parameter: address_t b franta-hg@28: * parameter: address_t GOTO target when a == b franta-hg@28: * parameter: address_t GOTO target when a > b franta-hg@28: * parameter: address_t GOTO target when a < b franta-hg@28: */ franta-hg@28: const command_t CMD_GOTO_COMPARE = 0x80; franta-hg@28: franta-hg@28: /** franta-hg@28: * Wait given time in ms. franta-hg@28: * parameter: sleep_t franta-hg@28: */ franta-hg@28: const command_t CMD_SLEEP = 0xFF; franta-hg@28: franta-hg@28: /** franta-hg@28: * Set RGB LED color. franta-hg@28: * parameter: led_t LED number franta-hg@28: * parameter: color_t red franta-hg@28: * parameter: color_t green franta-hg@28: * parameter: color_t blue franta-hg@28: */ franta-hg@28: const command_t CMD_COLOR = 0xAA; franta-hg@28: franta-hg@28: /** franta-hg@28: * Stop program. franta-hg@28: */ franta-hg@28: const command_t CMD_END = 0xED; franta-hg@28: franta-hg@28: /** franta-hg@28: * Increase value at given address franta-hg@28: * parameter: address_t franta-hg@28: */ franta-hg@28: const command_t CMD_INCREMENT = 0x11; franta-hg@28: franta-hg@28: /** franta-hg@28: * Decrease value at given address franta-hg@28: * parameter: address_t franta-hg@28: */ franta-hg@28: const command_t CMD_DECREMENT = 0x12; franta-hg@28: franta-hg@28: /** franta-hg@28: * Placeholder for unsupported command. franta-hg@28: * Just for testing. franta-hg@28: */ franta-hg@28: const command_t CMD_INVALID = 0x1; franta-hg@28: franta-hg@28: // TODO: more commands, better numbers