This repo contains the libraries of Mbed for LPC1549 with following changes: - IAP commands. - EEPROM write and read. - UART write and read (public) - CAN can_s -> LPC_C_CAN0_Type *can

Committer:
gmatarrubia
Date:
Tue Apr 14 15:00:13 2015 +0200
Revision:
0:820a69dfd200
Initial repo. IAP commands, EEPROM write/read, UART write/read, CAN

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gmatarrubia 0:820a69dfd200 1 /* mbed Microcontroller Library
gmatarrubia 0:820a69dfd200 2 * Copyright (c) 2006-2013 ARM Limited
gmatarrubia 0:820a69dfd200 3 *
gmatarrubia 0:820a69dfd200 4 * Licensed under the Apache License, Version 2.0 (the "License");
gmatarrubia 0:820a69dfd200 5 * you may not use this file except in compliance with the License.
gmatarrubia 0:820a69dfd200 6 * You may obtain a copy of the License at
gmatarrubia 0:820a69dfd200 7 *
gmatarrubia 0:820a69dfd200 8 * http://www.apache.org/licenses/LICENSE-2.0
gmatarrubia 0:820a69dfd200 9 *
gmatarrubia 0:820a69dfd200 10 * Unless required by applicable law or agreed to in writing, software
gmatarrubia 0:820a69dfd200 11 * distributed under the License is distributed on an "AS IS" BASIS,
gmatarrubia 0:820a69dfd200 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
gmatarrubia 0:820a69dfd200 13 * See the License for the specific language governing permissions and
gmatarrubia 0:820a69dfd200 14 * limitations under the License.
gmatarrubia 0:820a69dfd200 15 */
gmatarrubia 0:820a69dfd200 16 #ifndef MBED_SLEEP_API_H
gmatarrubia 0:820a69dfd200 17 #define MBED_SLEEP_API_H
gmatarrubia 0:820a69dfd200 18
gmatarrubia 0:820a69dfd200 19 #include "device.h"
gmatarrubia 0:820a69dfd200 20
gmatarrubia 0:820a69dfd200 21 #if DEVICE_SLEEP
gmatarrubia 0:820a69dfd200 22
gmatarrubia 0:820a69dfd200 23 #ifdef __cplusplus
gmatarrubia 0:820a69dfd200 24 extern "C" {
gmatarrubia 0:820a69dfd200 25 #endif
gmatarrubia 0:820a69dfd200 26
gmatarrubia 0:820a69dfd200 27 /** Send the microcontroller to sleep
gmatarrubia 0:820a69dfd200 28 *
gmatarrubia 0:820a69dfd200 29 * The processor is setup ready for sleep, and sent to sleep using __WFI(). In this mode, the
gmatarrubia 0:820a69dfd200 30 * system clock to the core is stopped until a reset or an interrupt occurs. This eliminates
gmatarrubia 0:820a69dfd200 31 * dynamic power used by the processor, memory systems and buses. The processor, peripheral and
gmatarrubia 0:820a69dfd200 32 * memory state are maintained, and the peripherals continue to work and can generate interrupts.
gmatarrubia 0:820a69dfd200 33 *
gmatarrubia 0:820a69dfd200 34 * The processor can be woken up by any internal peripheral interrupt or external pin interrupt.
gmatarrubia 0:820a69dfd200 35 *
gmatarrubia 0:820a69dfd200 36 * @note
gmatarrubia 0:820a69dfd200 37 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
gmatarrubia 0:820a69dfd200 38 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
gmatarrubia 0:820a69dfd200 39 * able to access the LocalFileSystem
gmatarrubia 0:820a69dfd200 40 */
gmatarrubia 0:820a69dfd200 41 void sleep(void);
gmatarrubia 0:820a69dfd200 42
gmatarrubia 0:820a69dfd200 43 /** Send the microcontroller to deep sleep
gmatarrubia 0:820a69dfd200 44 *
gmatarrubia 0:820a69dfd200 45 * This processor is setup ready for deep sleep, and sent to sleep using __WFI(). This mode
gmatarrubia 0:820a69dfd200 46 * has the same sleep features as sleep plus it powers down peripherals and clocks. All state
gmatarrubia 0:820a69dfd200 47 * is still maintained.
gmatarrubia 0:820a69dfd200 48 *
gmatarrubia 0:820a69dfd200 49 * The processor can only be woken up by an external interrupt on a pin or a watchdog timer.
gmatarrubia 0:820a69dfd200 50 *
gmatarrubia 0:820a69dfd200 51 * @note
gmatarrubia 0:820a69dfd200 52 * The mbed interface semihosting is disconnected as part of going to sleep, and can not be restored.
gmatarrubia 0:820a69dfd200 53 * Flash re-programming and the USB serial port will remain active, but the mbed program will no longer be
gmatarrubia 0:820a69dfd200 54 * able to access the LocalFileSystem
gmatarrubia 0:820a69dfd200 55 */
gmatarrubia 0:820a69dfd200 56 void deepsleep(void);
gmatarrubia 0:820a69dfd200 57
gmatarrubia 0:820a69dfd200 58 #ifdef __cplusplus
gmatarrubia 0:820a69dfd200 59 }
gmatarrubia 0:820a69dfd200 60 #endif
gmatarrubia 0:820a69dfd200 61
gmatarrubia 0:820a69dfd200 62 #endif
gmatarrubia 0:820a69dfd200 63
gmatarrubia 0:820a69dfd200 64 #endif