Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Nucleo_F103RB_RTC_battery_bkup_pwr_off_okay
Fork of mbed-dev by
targets/TARGET_NUVOTON/TARGET_NANO100/TARGET_NUMAKER_PFM_NANO130/objects.h
- Committer:
- maxxir
- Date:
- 2017-11-07
- Revision:
- 177:619788de047e
- Parent:
- 176:447f873cad2f
File content as of revision 177:619788de047e:
/* mbed Microcontroller Library * Copyright (c) 2015-2017 Nuvoton * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef MBED_OBJECTS_H #define MBED_OBJECTS_H #include "cmsis.h" #include "PortNames.h" #include "PeripheralNames.h" #include "PinNames.h" #include "dma_api.h" #ifdef __cplusplus extern "C" { #endif struct gpio_irq_s { PinName pin; uint32_t irq_handler; uint32_t irq_id; struct gpio_irq_s *next; }; struct port_s { PortName port; uint32_t mask; PinDirection direction; }; struct analogin_s { ADCName adc; }; struct serial_s { UARTName uart; PinName pin_tx; PinName pin_rx; uint32_t baudrate; uint32_t databits; uint32_t parity; uint32_t stopbits; void (*vec)(void); uint32_t irq_handler; uint32_t irq_id; uint32_t irq_en; uint32_t ier_msk; uint32_t async_en; // Async transfer related fields DMAUsage dma_usage_tx; DMAUsage dma_usage_rx; int dma_chn_id_tx; int dma_chn_id_rx; uint32_t event; void (*irq_handler_tx_async)(void); void (*irq_handler_rx_async)(void); }; struct spi_s { SPIName spi; PinName pin_miso; PinName pin_mosi; PinName pin_sclk; PinName pin_ssel; // Async transfer related fields DMAUsage dma_usage; int dma_chn_id_tx; int dma_chn_id_rx; uint32_t event; uint32_t hdlr_async; }; struct i2c_s { I2CName i2c; int slaveaddr_state; uint32_t tran_ctrl; char * tran_beg; char * tran_pos; char * tran_end; int inten; // Async transfer related fields DMAUsage dma_usage; uint32_t event; int stop; uint32_t address; uint32_t hdlr_async; }; struct pwmout_s { PWMName pwm; uint32_t period_us; uint32_t pulsewidth_us; }; #ifdef __cplusplus } #endif #include "gpio_object.h" #endif