mbed libraries for KL25Z

Dependents:   FRDM_RGBLED

can_api.h

Committer:
emilmont
Date:
2012-11-09
Revision:
8:c14af7958ef5
Child:
9:663789d7729f

File content as of revision 8:c14af7958ef5:

/* mbed Microcontroller Library - can_api
 * Copyright (c) 2009-2011 ARM Limited. All rights reserved.
 */
#ifndef MBED_CAN_API_H
#define MBED_CAN_API_H

#include "device.h"

#if DEVICE_CAN

#include "PinNames.h" 
#include "PeripheralNames.h"
#include "can_helper.h"

#ifdef __cplusplus
extern "C" {
#endif

CANName can_init(PinName rd, PinName td);
void can_free(CANName id);

int can_frequency(CANName id, int hz);

int can_write(CANName id, CAN_Message, int cc);
int can_read(CANName id, CAN_Message *msg);

void can_reset(CANName id);
unsigned char can_rderror(CANName id);
unsigned char can_tderror(CANName id);

void can_monitor(CANName id, int silent);

#ifdef __cplusplus
};
#endif

#endif    // MBED_CAN_API_H

#endif