==requirements== Inside a train, we should have: *exactly 2 driver intercom consoles *multiple 1-key devices located at cabins *multiple amplifiers mounted on the ceiling of cabins and several external amplifiers speakers All connected within the LAN. Plz implement following keys, LEDs and functions: ===keys=== # key1 for driver direct intercom. # key2 for driver pickup any call. # key3 for hung up all current calls OR reject an incoming call.. # key4 for internal board casting, press key3 to terminate. # key5 for external board casting, press key3 to terminate. ===led=== # LED1 blinking unaccepted incoming intercom calls, on established intercom calls # LED2 blinking unaccepted incoming emergency calls, on established emergency calls # LED3 on internal broadcasting # LED4 on external broadcasting ==pin脚定义== ==protocols== ===LED protocols=== *AM335x sends command to STM32 to drive LEDs '''通讯协议说明:''' *例如:0xa5 0x00 0xff 0x01 0x02 0x03 0x04 0x5a,其中0xa5为帧头,0x5a为帧尾,0x00表示第一个灯常灭,0xff表示第二个灯常亮,0x01表示1s闪烁一次,0x02表示1s闪烁2次,依次类推...