Исправил, запушил.
Также добавил в игнор меркуриала local_config.mk
- Код: Выделить всё • Развернуть
vovan@vovan-pc:~/dev/project/orfa$ miniterm.py -e /dev/rfcomm0
--- Miniterm on /dev/rfcomm0: 9600,8,N,1. ---
--- Quit: Ctrl+] | Upload: Ctrl+U ---
v
V1.0
l00
L00
s000000s0102p
# > cmd_start(0x00, 0)
# > cmd_txc(0x00)
# > cmd_txc(0x00)
# > cmd_start(0x01, 1)
# \-> gate_register_write(0x00, buf, 1)
# \-> gate_register_read(0x00, buf, 1)
# > cmd_rxc(0x05, 1)
# /-> gate_register_read(0x00, buf, 1)
# > cmd_rxc(0x05, 0)
# > cmd_stop()
SWAASR0505P
s000001p
# > cmd_start(0x00, 0)
# > cmd_txc(0x00)
# > cmd_txc(0x01)
# > cmd_stop()
# \-> gate_register_write(0x00, buf, 1)
SWAAP
s0102p
# > cmd_start(0x01, 1)
# \-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x40, 0)
# > cmd_stop()
SR0040P
s000002p
# > cmd_start(0x00, 0)
# > cmd_txc(0x00)
# > cmd_txc(0x02)
# > cmd_stop()
# \-> gate_register_write(0x00, buf, 5)
SWAAP
s010cp
# > cmd_start(0x01, 1)
# \-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x40, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x10, 1)
# > cmd_rxc(0x02, 1)
# /-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x40, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x10, 1)
# > cmd_rxc(0x02, 0)
# > cmd_stop()
SR004001001002004001001002P
--- exit ---
vovan@vovan-pc:~/dev/project/orfa$
Добавлено спустя 1 минуту 1 секунду:
- Код: Выделить всё • Развернуть
vovan@vovan-pc:~/dev/project/orfa$ orintro.py /dev/rfcomm0
PyOR version: 0.1.6
UIDs database version: 1.0.2
Serial Gate protocol version: 1.0
Selected device: 0x00
Drivers:
#1 RoboGPIO ADC driver
ADC driver
ADC_CONF — write 2 byte (WO):
| byte 1: adc mode & refrence mode
| bit 2: 8 bit/10 bit
| bit 0-1:
| 00: External refrence
| 01: AVCC refrence
| 10, 11: Internal refrence
| byte 2: enabled channels mask
ADC_DATA — write 1 byte start channel, output 1 or 2 bytes.
UID: 0x0040
Version: 1.0
Registers: 0x10, 0x11
ADC_CONF: 0x10
ADC_DATA: 0x11
#2 RoboMD2 motor driver
Motor driver
PWMn — motor n speed register (R/W)
DIRn — motor n direction register (R/W)
UID: 0x0060
Version: 1.0
Registers: 0x0C, 0x0D, 0x0E, 0x0F
DIR1: 0x0E
DIR2: 0x0F
PWM1: 0x0C
PWM2: 0x0D
#3 RoboBus SPI driver
SPI driver
<need more information about this driver>
UID: 0x0001
Version: 1.0
Registers: 0x0A, 0x0B
SPI_CONF: 0x0B
SPI_DATA: 0x0A
#4 RoboGPIO digital driver
Digital I/O driver
PORTc — port register (R/W)
DDRc — port direction (WO)
UID: 0x0020
Version: 1.0
Registers: 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09
DDRA: 0x06
DDRB: 0x07
DDRC: 0x08
DDRD: 0x09
PORTA: 0x02
PORTB: 0x03
PORTC: 0x04
PORTD: 0x05
Meta information:
rbgp: PORTB.4, PORTD.7, PORTD.6
gpio: 0, 0xe3, 0x03, 0x33
#5 Introspection driver
ORFA Introspection driver
INTRO register always 0x00
00 00 — get driver count
00 nn — get driver nn info
UID: 0x0000
Version: 1.0
Registers: 0x00
INTRO: 0x00
vovan@vovan-pc:~/dev/project/orfa$
Добавлено спустя 2 часа 20 минут 44 секунды:
Добавил инкрементное чтение интроспектора:
- Код: Выделить всё • Развернуть
vovan@vovan-pc:~/dev/project/orfa$ miniterm.py -e /dev/rfcomm0
--- Miniterm on /dev/rfcomm0: 9600,8,N,1. ---
--- Quit: Ctrl+] | Upload: Ctrl+U ---
v
V1.0
l00
L00
s000000s0101p
# > cmd_start(0x00, 0)
# > cmd_txc(0x00)
# > cmd_txc(0x00)
# > cmd_start(0x01, 1)
# \-> gate_register_write(0x00, buf, 1)
# \-> gate_register_read(0x00, buf, 1)
# > cmd_rxc(0x05, 0)
# > cmd_stop()
SWAASR05P
s000001p
# > cmd_start(0x00, 0)
# > cmd_txc(0x00)
# > cmd_txc(0x01)
# > cmd_stop()
# \-> gate_register_write(0x00, buf, 1)
SWAAP
s011ep
# > cmd_start(0x01, 1)
# \-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x40, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x10, 1)
# > cmd_rxc(0x02, 1)
# /-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x60, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x0c, 1)
# > cmd_rxc(0x04, 1)
# /-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x0a, 1)
# > cmd_rxc(0x02, 1)
# /-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x20, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x02, 1)
# > cmd_rxc(0x08, 1)
# /-> gate_register_read(0x00, buf, 6)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x01, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x00, 1)
# > cmd_rxc(0x01, 0)
# > cmd_stop()
SR004001001002006001000C04000101000A02002001000208000001000001P