Skip to content

Commit 37714c7

Browse files
committed
Add can_init_direct() functions to HAL API
1 parent 2970e5c commit 37714c7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hal/can_api.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,22 @@ typedef enum {
5555
MODE_TEST_SILENT
5656
} CanMode;
5757

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+
5866
typedef void (*can_irq_handler)(uint32_t id, CanIrqType type);
5967

6068
typedef struct can_s can_t;
6169

6270
void can_init(can_t *obj, PinName rd, PinName td);
71+
void can_init_direct(can_t *obj, const can_pinmap_t *pinmap);
6372
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);
6474
void can_free(can_t *obj);
6575
int can_frequency(can_t *obj, int hz);
6676

0 commit comments

Comments
 (0)