mbed libraries for KL25Z

Dependents:   FRDM_RGBLED

Revision:
7:73c5efe92a6c
Child:
8:c14af7958ef5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/port_api.h	Tue Oct 23 09:20:18 2012 +0000
@@ -0,0 +1,43 @@
+/* mbed Microcontroller Library - portmap
+ * Copyright (c) 2010-2011 ARM Limited. All rights reserved.
+ */
+#ifndef MBED_PORTMAP_H
+#define MBED_PORTMAP_H
+
+#include "device.h"
+
+#if DEVICE_PORTIN || DEVICE_PORTOUT
+
+#include "PinNames.h"
+#include "PortNames.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+    __IO uint32_t *reg_dir;
+#if defined(TARGET_LPC11U24)
+    __IO uint32_t *reg_mpin;
+#elif defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_KL25Z)
+    __IO uint32_t *reg_out;
+    __I  uint32_t *reg_in;
+#endif
+    PortName port;
+    uint32_t mask;
+} port_object;
+
+PinName port_pin(PortName port, int pin_n);
+
+void port_init (port_object *obj, PortName port, int mask, PinDirection dir);
+void port_mode (port_object *obj, PinMode mode);
+void port_dir  (port_object *obj, PinDirection dir);
+void port_write(port_object *obj, int value);
+int  port_read (port_object *obj);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif