The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Fri Sep 16 13:57:13 2016 +0100
Revision:
126:abea610beb85
Release 126 of the mbed library

Changes:

New Targets:
#2504: [Disco_F769NI] adding new target [https://github.com/ARMmbed/mbed-os/pull/2504]
#2654: DELTA_DFBM_NQ620 platform porting [https://github.com/ARMmbed/mbed-os/pull/2654]
#2615: [MTM_MTCONNECT04S] Added support for MTM_MTCONNECT04S [https://github.com/ARMmbed/mbed-os/pull/2615]
#2548: Nucleof303ze [https://github.com/ARMmbed/mbed-os/pull/2548]

Fixes:

#2657: [MAX326xx] Removed echoing of characters and carriage return. [https://github.com/ARMmbed/mbed-os/pull/2657]
#2651: Use lp_timer to count time in the deepsleep tests [https://github.com/ARMmbed/mbed-os/pull/2651]
#2643: Fix thread self termination [https://github.com/ARMmbed/mbed-os/pull/2643]
#2623: DISCO_L476VG - Add Serial Flow Control pins + add SERIAL_FC macro [https://github.com/ARMmbed/mbed-os/pull/2623]
#2617: STM32F2xx - Enable Serial Flow Control [https://github.com/ARMmbed/mbed-os/pull/2617]
#2601: Adding ON Semiconductor copyright notice to source and header files. [https://github.com/ARMmbed/mbed-os/pull/2601]
#2597: [HAL] Fixed "intrinsic is deprecated" warnings [https://github.com/ARMmbed/mbed-os/pull/2597]
#2589: [NUC472] Fix heap configuration error with armcc [https://github.com/ARMmbed/mbed-os/pull/2589]
#2587: add PTEx pins as option for SPI on Hexiwear - for SD Card Interface [https://github.com/ARMmbed/mbed-os/pull/2587]
#2584: Set size of callback irq array to IrqCnt [https://github.com/ARMmbed/mbed-os/pull/2584]
#2582: [GCC_CR] fix runtime hang for baremetal build [https://github.com/ARMmbed/mbed-os/pull/2582]
#2562: Fix GCC lazy init race condition and add test [https://github.com/ARMmbed/mbed-os/pull/2562]
#2538: STM32F4xx - Add support of ADC internal channels (Temp, VRef, VBat) [https://github.com/ARMmbed/mbed-os/pull/2538]
#2514: Updated FlexCan and SAI SDK drivers [https://github.com/ARMmbed/mbed-os/pull/2514]
#2442: Malloc heap info [https://github.com/ARMmbed/mbed-os/pull/2442]
#2419: [STM32F1] Add asynchronous serial [https://github.com/ARMmbed/mbed-os/pull/2419]
#2130: stm32 : reduce number of device.h files [https://github.com/ARMmbed/mbed-os/pull/2130]
#2678: Fixing NCS36510 compile on Linux [https://github.com/ARMmbed/mbed-os/pull/2678]
#2607: Fix uvisor memory tracing [https://github.com/ARMmbed/mbed-os/pull/2607]
#2596: [HAL] Improve memory tracer [https://github.com/ARMmbed/mbed-os/pull/2596]
#2487: Runtime dynamic memory tracing [https://github.com/ARMmbed/mbed-os/pull/2487]

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 126:abea610beb85 1 /* mbed Microcontroller Library
AnnaBridge 126:abea610beb85 2 * Copyright (c) 2013 Nordic Semiconductor
AnnaBridge 126:abea610beb85 3 *
AnnaBridge 126:abea610beb85 4 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 126:abea610beb85 5 * you may not use this file except in compliance with the License.
AnnaBridge 126:abea610beb85 6 * You may obtain a copy of the License at
AnnaBridge 126:abea610beb85 7 *
AnnaBridge 126:abea610beb85 8 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 126:abea610beb85 9 *
AnnaBridge 126:abea610beb85 10 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 126:abea610beb85 11 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 126:abea610beb85 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 126:abea610beb85 13 * See the License for the specific language governing permissions and
AnnaBridge 126:abea610beb85 14 * limitations under the License.
AnnaBridge 126:abea610beb85 15 */
AnnaBridge 126:abea610beb85 16 #ifndef MBED_OBJECTS_H
AnnaBridge 126:abea610beb85 17 #define MBED_OBJECTS_H
AnnaBridge 126:abea610beb85 18
AnnaBridge 126:abea610beb85 19 #include "cmsis.h"
AnnaBridge 126:abea610beb85 20 #include "PortNames.h"
AnnaBridge 126:abea610beb85 21 #include "PeripheralNames.h"
AnnaBridge 126:abea610beb85 22 #include "PinNames.h"
AnnaBridge 126:abea610beb85 23
AnnaBridge 126:abea610beb85 24 #ifdef __cplusplus
AnnaBridge 126:abea610beb85 25 extern "C" {
AnnaBridge 126:abea610beb85 26 #endif
AnnaBridge 126:abea610beb85 27
AnnaBridge 126:abea610beb85 28 #define I2C_SPI_PERIPHERAL_FOR_I2C 1
AnnaBridge 126:abea610beb85 29 #define I2C_SPI_PERIPHERAL_FOR_SPI 2
AnnaBridge 126:abea610beb85 30
AnnaBridge 126:abea610beb85 31 typedef struct {
AnnaBridge 126:abea610beb85 32 uint8_t usage; // I2C: 1, SPI: 2
AnnaBridge 126:abea610beb85 33 uint8_t sda_mosi;
AnnaBridge 126:abea610beb85 34 uint8_t scl_miso;
AnnaBridge 126:abea610beb85 35 uint8_t sclk;
AnnaBridge 126:abea610beb85 36 } i2c_spi_peripheral_t;
AnnaBridge 126:abea610beb85 37
AnnaBridge 126:abea610beb85 38 struct serial_s {
AnnaBridge 126:abea610beb85 39 NRF_UART_Type *uart;
AnnaBridge 126:abea610beb85 40 int index;
AnnaBridge 126:abea610beb85 41 };
AnnaBridge 126:abea610beb85 42
AnnaBridge 126:abea610beb85 43 struct spi_s {
AnnaBridge 126:abea610beb85 44 NRF_SPI_Type *spi;
AnnaBridge 126:abea610beb85 45 NRF_SPIS_Type *spis;
AnnaBridge 126:abea610beb85 46 uint8_t peripheral;
AnnaBridge 126:abea610beb85 47 };
AnnaBridge 126:abea610beb85 48
AnnaBridge 126:abea610beb85 49 struct port_s {
AnnaBridge 126:abea610beb85 50 __IO uint32_t *reg_cnf;
AnnaBridge 126:abea610beb85 51 __IO uint32_t *reg_out;
AnnaBridge 126:abea610beb85 52 __I uint32_t *reg_in;
AnnaBridge 126:abea610beb85 53 PortName port;
AnnaBridge 126:abea610beb85 54 uint32_t mask;
AnnaBridge 126:abea610beb85 55 };
AnnaBridge 126:abea610beb85 56
AnnaBridge 126:abea610beb85 57 struct pwmout_s {
AnnaBridge 126:abea610beb85 58 PWMName pwm;
AnnaBridge 126:abea610beb85 59 PinName pin;
AnnaBridge 126:abea610beb85 60 };
AnnaBridge 126:abea610beb85 61
AnnaBridge 126:abea610beb85 62 struct i2c_s {
AnnaBridge 126:abea610beb85 63 NRF_TWI_Type *i2c;
AnnaBridge 126:abea610beb85 64 PinName sda;
AnnaBridge 126:abea610beb85 65 PinName scl;
AnnaBridge 126:abea610beb85 66 int freq;
AnnaBridge 126:abea610beb85 67 uint8_t address_set;
AnnaBridge 126:abea610beb85 68 uint8_t peripheral;
AnnaBridge 126:abea610beb85 69 };
AnnaBridge 126:abea610beb85 70
AnnaBridge 126:abea610beb85 71 struct analogin_s {
AnnaBridge 126:abea610beb85 72 ADCName adc;
AnnaBridge 126:abea610beb85 73 uint8_t adc_pin;
AnnaBridge 126:abea610beb85 74 };
AnnaBridge 126:abea610beb85 75
AnnaBridge 126:abea610beb85 76 struct gpio_irq_s {
AnnaBridge 126:abea610beb85 77 uint32_t ch;
AnnaBridge 126:abea610beb85 78 };
AnnaBridge 126:abea610beb85 79
AnnaBridge 126:abea610beb85 80 #include "gpio_object.h"
AnnaBridge 126:abea610beb85 81
AnnaBridge 126:abea610beb85 82 #ifdef __cplusplus
AnnaBridge 126:abea610beb85 83 }
AnnaBridge 126:abea610beb85 84 #endif
AnnaBridge 126:abea610beb85 85
AnnaBridge 126:abea610beb85 86 #endif