We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2970e5c commit 37714c7Copy full SHA for 37714c7
hal/can_api.h
@@ -55,12 +55,22 @@ typedef enum {
55
MODE_TEST_SILENT
56
} CanMode;
57
58
+typedef struct {
59
+ int peripheral;
60
+ PinName rd_pin;
61
+ int rd_function;
62
+ PinName td_pin;
63
+ int td_function;
64
+} can_pinmap_t;
65
+
66
typedef void (*can_irq_handler)(uint32_t id, CanIrqType type);
67
68
typedef struct can_s can_t;
69
70
void can_init(can_t *obj, PinName rd, PinName td);
71
+void can_init_direct(can_t *obj, const can_pinmap_t *pinmap);
72
void can_init_freq(can_t *obj, PinName rd, PinName td, int hz);
73
+void can_init_freq_direct(can_t *obj, const can_pinmap_t *pinmap, int hz);
74
void can_free(can_t *obj);
75
int can_frequency(can_t *obj, int hz);
76
0 commit comments