A simple API/Software interface to the LPC17xx PWM peripheral to provide control to up to six RC type servo controllers.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SimpleRCmbed.h Source File

SimpleRCmbed.h

00001 /****************************************************************************
00002  * Product: LIB17 Open Source Library
00003  *
00004  *                    Steller Technologies Limited
00005  *                    ----------------------------
00006  *
00007  * Copyright (C) 2002-2011 Steller Technologies Limited. All rights reserved.
00008  *
00009  * This software may be distributed and modified under the terms of the GNU
00010  * General Public License version 2 (GPL) as published by the Free Software
00011  * Foundation and appearing in the file GPL.TXT included in the packaging of
00012  * this file. Please note that GPL Section 2[b] requires that all works based
00013  * on this software must also be made publicly available under the terms of
00014  * the GPL ("Copyleft").
00015  *
00016  * Alternatively, this software may be distributed and modified under the
00017  * terms of Steller Technologies Limited commercial licenses, which expressly
00018  * supersede the GPL and are specifically designed for licensees interested in
00019  * retaining the proprietary status of their code.
00020  *
00021  ***************************************************************************/
00022 
00023 #ifndef AJK_SIMPLERCMBED_H
00024 #define AJK_SIMPLERCMBED_H
00025 
00026 #ifndef MBED_PINNAMES_H
00027 #define MBED_PINNAMES_H
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 typedef enum {
00034     P0_0 = LPC_GPIO0_BASE, P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7
00035             , P0_8, P0_9, P0_10, P0_11, P0_12, P0_13, P0_14, P0_15
00036             , P0_16, P0_17, P0_18, P0_19, P0_20, P0_21, P0_22, P0_23
00037             , P0_24, P0_25, P0_26, P0_27, P0_28, P0_29, P0_30, P0_31
00038             , P1_0, P1_1, P1_2, P1_3, P1_4, P1_5, P1_6, P1_7
00039             , P1_8, P1_9, P1_10, P1_11, P1_12, P1_13, P1_14, P1_15
00040             , P1_16, P1_17, P1_18, P1_19, P1_20, P1_21, P1_22, P1_23
00041             , P1_24, P1_25, P1_26, P1_27, P1_28, P1_29, P1_30, P1_31
00042             , P2_0, P2_1, P2_2, P2_3, P2_4, P2_5, P2_6, P2_7
00043             , P2_8, P2_9, P2_10, P2_11, P2_12, P2_13, P2_14, P2_15
00044             , P2_16, P2_17, P2_18, P2_19, P2_20, P2_21, P2_22, P2_23
00045             , P2_24, P2_25, P2_26, P2_27, P2_28, P2_29, P2_30, P2_31
00046             , P3_0, P3_1, P3_2, P3_3, P3_4, P3_5, P3_6, P3_7
00047             , P3_8, P3_9, P3_10, P3_11, P3_12, P3_13, P3_14, P3_15
00048             , P3_16, P3_17, P3_18, P3_19, P3_20, P3_21, P3_22, P3_23
00049             , P3_24, P3_25, P3_26, P3_27, P3_28, P3_29, P3_30, P3_31
00050             , P4_0, P4_1, P4_2, P4_3, P4_4, P4_5, P4_6, P4_7
00051             , P4_8, P4_9, P4_10, P4_11, P4_12, P4_13, P4_14, P4_15
00052             , P4_16, P4_17, P4_18, P4_19, P4_20, P4_21, P4_22, P4_23
00053             , P4_24, P4_25, P4_26, P4_27, P4_28, P4_29, P4_30, P4_31
00054 
00055             // Mbed DIP Pin Names
00056             , p5 = P0_9, p6 = P0_8, p7 = P0_7, p8 = P0_6, p9 = P0_0, p10 = P0_1
00057             , p11 = P0_18, p12 = P0_17, p13 = P0_15, p14 = P0_16, p15 = P0_23
00058             , p16 = P0_24, p17 = P0_25, p18 = P0_26, p19 = P1_30, p20 = P1_31
00059             , p21 = P2_5, p22 = P2_4, p23 = P2_3, p24 = P2_2, p25 = P2_1
00060             , p26 = P2_0, p27 = P0_11, p28 = P0_10, p29 = P0_5, p30 = P0_4
00061 
00062             // Other Mbed Pin Names
00063             , LED1 = P1_18, LED2 = P1_20, LED3 = P1_21, LED4 = P1_23
00064             , USBTX = P0_2, USBRX = P0_3
00065 
00066             // Not connected
00067             , NC = (int)0xFFFFFFFF
00068 
00069 } PinName;
00070 
00071 typedef enum {
00072     PullUp = 0
00073     , Repeater = 1
00074     , PullNone = 2
00075     , PullDown = 3
00076     , OpenDrain = 4
00077 } PinMode;
00078 
00079 #ifdef __cplusplus
00080 }
00081 #endif
00082 
00083 #endif /* MBED_PINNAMES_H */
00084 
00085 #endif /* AJK_SIMPLERCMBED_H */