Home Alert System

Dependencies:   PWM_Tone_Library DHT

Committer:
aziz111
Date:
Fri Mar 08 17:15:02 2019 +0000
Revision:
5:569a4894abc1
Parent:
3:78f223d34f36
Final

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ethaderu 3:78f223d34f36 1 /* mbed Microcontroller Library
ethaderu 3:78f223d34f36 2 * Copyright (c) 2006-2013 ARM Limited
ethaderu 3:78f223d34f36 3 *
ethaderu 3:78f223d34f36 4 * Licensed under the Apache License, Version 2.0 (the "License");
ethaderu 3:78f223d34f36 5 * you may not use this file except in compliance with the License.
ethaderu 3:78f223d34f36 6 * You may obtain a copy of the License at
ethaderu 3:78f223d34f36 7 *
ethaderu 3:78f223d34f36 8 * http://www.apache.org/licenses/LICENSE-2.0
ethaderu 3:78f223d34f36 9 *
ethaderu 3:78f223d34f36 10 * Unless required by applicable law or agreed to in writing, software
ethaderu 3:78f223d34f36 11 * distributed under the License is distributed on an "AS IS" BASIS,
ethaderu 3:78f223d34f36 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ethaderu 3:78f223d34f36 13 * See the License for the specific language governing permissions and
ethaderu 3:78f223d34f36 14 * limitations under the License.
ethaderu 3:78f223d34f36 15 */
ethaderu 3:78f223d34f36 16 #ifndef MBED_CAN_HELPER_H
ethaderu 3:78f223d34f36 17 #define MBED_CAN_HELPER_H
ethaderu 3:78f223d34f36 18
ethaderu 3:78f223d34f36 19 #if DEVICE_CAN
ethaderu 3:78f223d34f36 20
ethaderu 3:78f223d34f36 21 #ifdef __cplusplus
ethaderu 3:78f223d34f36 22 extern "C" {
ethaderu 3:78f223d34f36 23 #endif
ethaderu 3:78f223d34f36 24
ethaderu 3:78f223d34f36 25 enum CANFormat {
ethaderu 3:78f223d34f36 26 CANStandard = 0,
ethaderu 3:78f223d34f36 27 CANExtended = 1,
ethaderu 3:78f223d34f36 28 CANAny = 2
ethaderu 3:78f223d34f36 29 };
ethaderu 3:78f223d34f36 30 typedef enum CANFormat CANFormat;
ethaderu 3:78f223d34f36 31
ethaderu 3:78f223d34f36 32 enum CANType {
ethaderu 3:78f223d34f36 33 CANData = 0,
ethaderu 3:78f223d34f36 34 CANRemote = 1
ethaderu 3:78f223d34f36 35 };
ethaderu 3:78f223d34f36 36 typedef enum CANType CANType;
ethaderu 3:78f223d34f36 37
ethaderu 3:78f223d34f36 38 struct CAN_Message {
ethaderu 3:78f223d34f36 39 unsigned int id; // 29 bit identifier
ethaderu 3:78f223d34f36 40 unsigned char data[8]; // Data field
ethaderu 3:78f223d34f36 41 unsigned char len; // Length of data field in bytes
ethaderu 3:78f223d34f36 42 CANFormat format; // 0 - STANDARD, 1- EXTENDED IDENTIFIER
ethaderu 3:78f223d34f36 43 CANType type; // 0 - DATA FRAME, 1 - REMOTE FRAME
ethaderu 3:78f223d34f36 44 };
ethaderu 3:78f223d34f36 45 typedef struct CAN_Message CAN_Message;
ethaderu 3:78f223d34f36 46
ethaderu 3:78f223d34f36 47 #ifdef __cplusplus
ethaderu 3:78f223d34f36 48 };
ethaderu 3:78f223d34f36 49 #endif
ethaderu 3:78f223d34f36 50
ethaderu 3:78f223d34f36 51 #endif
ethaderu 3:78f223d34f36 52
ethaderu 3:78f223d34f36 53 #endif // MBED_CAN_HELPER_H