Commit 2003449b authored by ttwards's avatar ttwards
Browse files

Defined all dji motors to be dji,motor

Added part of rtt_graph drivers.
To do: rtt_graph driver
parent 4fd74edf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
            "preRestartCommands": [
                // "monitor reset halt"
            ],
            "gdbPath": "${userHome}/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
            "gdbPath": "${userHome}/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
            "liveWatch": {
                "enabled": true,
                "samplesPerSecond": 1
@@ -39,7 +39,7 @@
                "interface/stlink.cfg",
                "target/stm32f4x.cfg"
            ],
            "gdbPath": "${userHome}/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb"
            "gdbPath": "${userHome}/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb"
        },
    ]
}
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -55,4 +55,11 @@
        // pch优化的位置
        "--pch-storage=disk",
  ],
  "terminal.integrated.defaultProfile.osx": "zsh",
  "terminal.integrated.profiles.osx": {
      "zsh": {
          "path": "/bin/zsh",
          "args": []
      }
  }
}
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
@@ -5,6 +5,12 @@
            "label": "Build",
            "type": "shell",
            "command": "west build -p always -b robomaster_board_c motor",
            "args": [],
            "options": {
                "env": {
                    "PATH": "/opt/miniconda3/bin:${env:PATH}"
                }
            },
            "group": {
                "kind": "build",
                "isDefault": false
+3 −3
Original line number Diff line number Diff line
@@ -68,9 +68,9 @@
	};
    rm_motor {
		motor0: motor0{
			compatible = "dji,m3508";
			tx_addr = <0x200>;
			rx_addr = <0x201>;
			compatible = "dji,motor";
            is_m3508;
			id = <1>;
			gear_ratio = <1920>;
			label = "Motor0";
			status = "okay";

drivers/graph/graph.h

0 → 100644
+21 −0
Original line number Diff line number Diff line
#include<zephyr/devicetree.h>
#include<zephyr/device.h>

typedef enum {
    STRING,
    INTEGER,
    FLOAT,
    DOUBLE,
    RAW
} VarType;

typedef struct {
    VarType type;
    int16_t size;
    void* ptr;
} feedbackVar;

#define DT_GRAPH_DEFINE(node_id) \
  DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, prio, api,       \
                   __VA_ARGS__)
                   
 No newline at end of file
Loading