三浦 颯太
/
NRP2020_main
seisakutyu
main.cpp
- Committer:
- M_souta
- Date:
- 2020-01-24
- Revision:
- 3:8790e69f8c59
- Parent:
- 2:32d2cd7d744b
File content as of revision 3:8790e69f8c59:
#include "mbed.h" #include "Motor.h" #include "MCP.h" #include "XBee.h" #include <stdint.h> #define SDA PB_7 #define SCL PB_6 #define MCP_ADDRESS 0x40 MCP MCP(SDA, SCL, MCP_ADDRESS); XBEE::ControllerData *controller; MOTOR::MotorStatus motor[MOUNTING_MOTOR_NUM]; /* ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */ /* ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */ int main() { XBEE::Controller::Initialize(); MOTOR::Motor::Initialize(); __enable_irq(); /* ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */ /* ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */ while(1) { controller = XBEE::Controller::GetData(); MCP.Update(); /* ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */ /* ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ */ MOTOR::Motor::Update(motor); } }