Add can_init_direct() functions to HAL API

pull/11892/head
Przemyslaw Stekiel 2019-09-23 14:32:43 +02:00
parent 2970e5c699
commit 37714c7894
1 changed files with 10 additions and 0 deletions

View File

@ -55,12 +55,22 @@ typedef enum {
MODE_TEST_SILENT
} CanMode;
typedef struct {
int peripheral;
PinName rd_pin;
int rd_function;
PinName td_pin;
int td_function;
} can_pinmap_t;
typedef void (*can_irq_handler)(uint32_t id, CanIrqType type);
typedef struct can_s can_t;
void can_init(can_t *obj, PinName rd, PinName td);
void can_init_direct(can_t *obj, const can_pinmap_t *pinmap);
void can_init_freq(can_t *obj, PinName rd, PinName td, int hz);
void can_init_freq_direct(can_t *obj, const can_pinmap_t *pinmap, int hz);
void can_free(can_t *obj);
int can_frequency(can_t *obj, int hz);