mbed libraries for KL25Z
port_api.h@8:c14af7958ef5, 2012-11-09 (annotated)
- Committer:
- emilmont
- Date:
- Fri Nov 09 11:33:53 2012 +0000
- Revision:
- 8:c14af7958ef5
- Parent:
- 7:73c5efe92a6c
- Child:
- 9:663789d7729f
SPI driver; ADC driver; DAC driver; microlib support; general bugfixing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 7:73c5efe92a6c | 1 | /* mbed Microcontroller Library - portmap |
emilmont | 7:73c5efe92a6c | 2 | * Copyright (c) 2010-2011 ARM Limited. All rights reserved. |
emilmont | 7:73c5efe92a6c | 3 | */ |
emilmont | 7:73c5efe92a6c | 4 | #ifndef MBED_PORTMAP_H |
emilmont | 7:73c5efe92a6c | 5 | #define MBED_PORTMAP_H |
emilmont | 7:73c5efe92a6c | 6 | |
emilmont | 7:73c5efe92a6c | 7 | #include "device.h" |
emilmont | 7:73c5efe92a6c | 8 | |
emilmont | 7:73c5efe92a6c | 9 | #if DEVICE_PORTIN || DEVICE_PORTOUT |
emilmont | 7:73c5efe92a6c | 10 | |
emilmont | 7:73c5efe92a6c | 11 | #ifdef __cplusplus |
emilmont | 7:73c5efe92a6c | 12 | extern "C" { |
emilmont | 7:73c5efe92a6c | 13 | #endif |
emilmont | 7:73c5efe92a6c | 14 | |
emilmont | 8:c14af7958ef5 | 15 | typedef struct port_object_s port_object; |
emilmont | 7:73c5efe92a6c | 16 | |
emilmont | 7:73c5efe92a6c | 17 | PinName port_pin(PortName port, int pin_n); |
emilmont | 7:73c5efe92a6c | 18 | |
emilmont | 7:73c5efe92a6c | 19 | void port_init (port_object *obj, PortName port, int mask, PinDirection dir); |
emilmont | 7:73c5efe92a6c | 20 | void port_mode (port_object *obj, PinMode mode); |
emilmont | 7:73c5efe92a6c | 21 | void port_dir (port_object *obj, PinDirection dir); |
emilmont | 7:73c5efe92a6c | 22 | void port_write(port_object *obj, int value); |
emilmont | 7:73c5efe92a6c | 23 | int port_read (port_object *obj); |
emilmont | 7:73c5efe92a6c | 24 | |
emilmont | 7:73c5efe92a6c | 25 | #ifdef __cplusplus |
emilmont | 7:73c5efe92a6c | 26 | } |
emilmont | 7:73c5efe92a6c | 27 | #endif |
emilmont | 7:73c5efe92a6c | 28 | #endif |
emilmont | 7:73c5efe92a6c | 29 | |
emilmont | 7:73c5efe92a6c | 30 | #endif |