# -*- coding: utf-8 -*-

# Memory addresses
ADDRESS_R15 = 0x400f
ADDRESS_ADC_POWER = 0x4062
ADDRESS_ADC_BATTERY = 0x4063
ADDRESS_LEVELA = 0x4064
ADDRESS_LEVELB = 0x4065
ADDRESS_PUSH_BUTTON = 0x4068
ADDRESS_COMMAND_1 = 0x4070
ADDRESS_COMMAND_2 = 0x4071
ADDRESS_MA_MIN_VALUE = 0x4086
ADDRESS_MA_MAX_VALUE = 0x4087
ADDRESS_CURRENT_MODE = 0x407b
ADDRESS_LCD_WRITE_PARAMETER_1 = 0x4180
ADDRESS_LCD_WRITE_PARAMETER_2 = 0x4181
ADDRESS_POWER_LEVEL = 0x41f4
ADDRESS_BATTERY_LEVEL = 0x4203
ADDRESS_LEVELMA = 0x420D
ADDRESS_KEY = 0x4213

# EEPROM addresses
EEPROM_ADDRESS_POWER_LEVEL = 0x8009
EEPROM_ADDRESS_FAVORITE_MODE = 0x800C

# Commands
COMMAND_START_FAVORITE_MODULE = 0x00
COMMAND_EXIT_MENU = 0x04
COMMAND_SHOW_MAIN_MENU = 0x0a
COMMAND_NEW_MODE = 0x12
COMMAND_WRITE_STRING_TO_LCD = 0x15
COMMAND_NO_COMMAND = 0xff

# Modes
MODE_POWERON = 0x00
MODE_UNKNOWN = 0x01
MODE_WAVES = 0x76
MODE_STROKE = 0x77
MODE_CLIMB = 0x78
MODE_COMBO = 0x79
MODE_INTENSE = 0x7a
MODE_RYTHM = 0x7b
MODE_AUDIO1 = 0x7c
MODE_AUDIO2 = 0x7d
MODE_AUDIO3 = 0x7e
MODE_SPLIT = 0x7f
MODE_RANDOM1 = 0x80
MODE_RANDOM2 = 0x81
MODE_TOGGLE = 0x82
MODE_ORGASM = 0x83
MODE_TORMENT = 0x84
MODE_PHASE1 = 0x85
MODE_PHASE2 = 0x86
MODE_PHASE3 = 0x87
MODE_USER1 = 0x88
MODE_USER2 = 0x89
MODE_USER3 = 0x8a
MODE_USER4 = 0x8b
MODE_USER5 = 0x8c
MODE_USER6 = 0x8d
MODE_USER7 = 0x8e

# Power Level
POWERLEVEL_LOW = 0x01
POWERLEVEL_NORMAL = 0x02
POWERLEVEL_HIGH = 0x03

# Register 15 Bits
REGISTER_15_ADCDISABLE = 0

# Buttons
BUTTON_MENU = 0x80
BUTTON_OK = 0x20
BUTTON_RIGHT = 0x40
BUTTON_LEFT = 0x10

# -*- coding: utf-8 -*-

# Memory addresses
ADDRESS_R15 = 0x400f
ADDRESS_ADC_POWER = 0x4062
ADDRESS_ADC_BATTERY = 0x4063
ADDRESS_LEVELA = 0x4064
ADDRESS_LEVELB = 0x4065
ADDRESS_PUSH_BUTTON = 0x4068
ADDRESS_COMMAND_1 = 0x4070
ADDRESS_COMMAND_2 = 0x4071
ADDRESS_MA_MIN_VALUE = 0x4086
ADDRESS_MA_MAX_VALUE = 0x4087
ADDRESS_CURRENT_MODE = 0x407b
ADDRESS_LCD_WRITE_PARAMETER_1 = 0x4180
ADDRESS_LCD_WRITE_PARAMETER_2 = 0x4181
ADDRESS_POWER_LEVEL = 0x41f4
ADDRESS_BATTERY_LEVEL = 0x4203
ADDRESS_LEVELMA = 0x420D
ADDRESS_KEY = 0x4213

# EEPROM addresses
EEPROM_ADDRESS_POWER_LEVEL = 0x8009
EEPROM_ADDRESS_FAVORITE_MODE = 0x800C

# Commands
COMMAND_START_FAVORITE_MODULE = 0x00
COMMAND_EXIT_MENU = 0x04
COMMAND_SHOW_MAIN_MENU = 0x0a
COMMAND_NEW_MODE = 0x12
COMMAND_WRITE_STRING_TO_LCD = 0x15
COMMAND_NO_COMMAND = 0xff

# Modes
MODE_POWERON = 0x00
MODE_UNKNOWN = 0x01
MODE_WAVES = 0x76
MODE_STROKE = 0x77
MODE_CLIMB = 0x78
MODE_COMBO = 0x79
MODE_INTENSE = 0x7a
MODE_RYTHM = 0x7b
MODE_AUDIO1 = 0x7c
MODE_AUDIO2 = 0x7d
MODE_AUDIO3 = 0x7e
MODE_SPLIT = 0x7f
MODE_RANDOM1 = 0x80
MODE_RANDOM2 = 0x81
MODE_TOGGLE = 0x82
MODE_ORGASM = 0x83
MODE_TORMENT = 0x84
MODE_PHASE1 = 0x85
MODE_PHASE2 = 0x86
MODE_PHASE3 = 0x87
MODE_USER1 = 0x88
MODE_USER2 = 0x89
MODE_USER3 = 0x8a
MODE_USER4 = 0x8b
MODE_USER5 = 0x8c
MODE_USER6 = 0x8d
MODE_USER7 = 0x8e

# Power Level
POWERLEVEL_LOW = 0x01
POWERLEVEL_NORMAL = 0x02
POWERLEVEL_HIGH = 0x03

# Register 15 Bits
REGISTER_15_ADCDISABLE = 0

# Buttons
BUTTON_MENU = 0x80
BUTTON_OK = 0x20
BUTTON_RIGHT = 0x40
BUTTON_LEFT = 0x10

# -*- coding: utf-8 -*- # Memory addresses # EEPROM addresses # Commands # Modes # Power Level # Register 15 Bits # Buttons