Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: lib_i2c_slave_block
cmds.h
00001 00002 #define CMD_TEST3 0x00 00003 #define CMD_TEST12 0x01 00004 #define CMD_TEST32 0x02 00005 #define CMD_IRQ 0x03 00006 #define CMD_BUFFER 0x04 00007 00008 #define CMD_TIMEOUT 0xfd // indication of smbus timeout 00009 #define CMD_ARLO 0xfe // indication of arbitration lost 00010 #define CMD_BUSERR 0xff // indication of start or stop during transfer 00011 00012 typedef union { 00013 struct __attribute__((packed)) { 00014 struct { 00015 uint8_t button : 1; // 0 00016 uint8_t xyz : 1; // 1 00017 uint8_t res : 6; // 2,3,4,5,6,7 00018 } flags; 00019 uint8_t cnt; // if flags.button 00020 uint8_t a; 00021 int8_t b; 00022 int8_t c; 00023 } fields; 00024 uint8_t buf[5]; 00025 } irq_t; 00026 00027 extern const uint8_t cmd_to_length[];
Generated on Fri Jul 15 2022 01:13:08 by
1.7.2