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: mbed
Diff: scrp_slave.hpp
- Revision:
- 3:28c77df7c0b6
- Parent:
- 2:141358d84ff4
- Child:
- 4:39ef4d91dc34
diff -r 141358d84ff4 -r 28c77df7c0b6 scrp_slave.hpp
--- 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);