明石高専ロボ研 mbedライブラリ

Dependencies:   mbed

Revision:
3:28c77df7c0b6
Parent:
2:141358d84ff4
Child:
4:39ef4d91dc34
--- a/scrp_slave.hpp	Fri Jan 03 02:37:48 2020 +0000
+++ b/scrp_slave.hpp	Mon Jan 06 11:06:26 2020 +0000
@@ -12,8 +12,13 @@
  *example not usb port
  *L432KC : TX = PA_9 , RX = PA_10 , REDE = PA_12 , addr = 0x0803e000
  *F446RE : TX = PC_12 , RX = PD_2 , RDDE = PH_1 , addr = 0x0807ffff
+ *<obj>.addCMD(int cmd, bool (*proc)(int rx_data, int& tx_data))
+ *でcmdで指定したコマンドを受信したときに呼び出される
+ *bool型で引数が(int rx_data, int& tx_data)の関数を指定する。
  */
 //ScrpSlave slave(SERIAL_TX,SERIAL_RX);
+//ScrpSlave slave(PC_12,PD_2 ,PH_1 ,SERIAL_TX,SERIAL_RX,0x0807ffff);
+//ScrpSlave slave(PA_9 ,PA_10,PA_12,SERIAL_TX,SERIAL_RX,0x0803e000);
 
 inline int constrain(int x,int a,int b){
     return (x < a ? a : x > b ? b : x);