fix for mbed lib issue 3 (i2c problem) see also https://mbed.org/users/mbed_official/code/mbed/issues/3 affected implementations: LPC812, LPC11U24, LPC1768, LPC2368, LPC4088

Fork of mbed-src by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers can_api.h Source File

can_api.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2006-2013 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef MBED_CAN_API_H
00017 #define MBED_CAN_API_H
00018 
00019 #include "device.h"
00020 
00021 #if DEVICE_CAN
00022 
00023 #include "PinNames.h"
00024 #include "PeripheralNames.h"
00025 #include "can_helper.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00031 typedef struct can_s can_t;
00032 
00033 void          can_init     (can_t *obj, PinName rd, PinName td);
00034 void          can_free     (can_t *obj);
00035 int           can_frequency(can_t *obj, int hz);
00036 int           can_write    (can_t *obj, CAN_Message, int cc);
00037 int           can_read     (can_t *obj, CAN_Message *msg);
00038 void          can_reset    (can_t *obj);
00039 unsigned char can_rderror  (can_t *obj);
00040 unsigned char can_tderror  (can_t *obj);
00041 void          can_monitor  (can_t *obj, int silent);
00042 
00043 #ifdef __cplusplus
00044 };
00045 #endif
00046 
00047 #endif    // MBED_CAN_API_H
00048 
00049 #endif