标签: c++ raspberry-pi
我想开始 pn532
int USB = open( "/dev/ttyUSB2", O_RDWR| O_NOCTTY ); ... char cmd[] = {0x55, 0x55, 0, 0, 0}; do { n_written = write( USB, &cmd[spot], 1 ); spot += n_written; } while (cmd[spot-1] != '\r' && n_written > 0);
但它不起作用。我的错误在哪里?