mbed.h library with any bug fixes AV finds.
Dependents: micromouse4_encoder_testing PID_Test Lab1_Test WorkingPID ... more
targets/hal/TARGET_Maxim/TARGET_MAX32610/objects.h@0:ba7650f404af, 2015-11-02 (annotated)
- Committer:
- aravindsv
- Date:
- Mon Nov 02 02:26:59 2015 +0000
- Revision:
- 0:ba7650f404af
Reduced HSE_STARTUP_TIMEOUT to 500 ms, fixed some compiler warnings
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aravindsv | 0:ba7650f404af | 1 | /******************************************************************************* |
aravindsv | 0:ba7650f404af | 2 | * Copyright (C) 2015 Maxim Integrated Products, Inc., All Rights Reserved. |
aravindsv | 0:ba7650f404af | 3 | * |
aravindsv | 0:ba7650f404af | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
aravindsv | 0:ba7650f404af | 5 | * copy of this software and associated documentation files (the "Software"), |
aravindsv | 0:ba7650f404af | 6 | * to deal in the Software without restriction, including without limitation |
aravindsv | 0:ba7650f404af | 7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
aravindsv | 0:ba7650f404af | 8 | * and/or sell copies of the Software, and to permit persons to whom the |
aravindsv | 0:ba7650f404af | 9 | * Software is furnished to do so, subject to the following conditions: |
aravindsv | 0:ba7650f404af | 10 | * |
aravindsv | 0:ba7650f404af | 11 | * The above copyright notice and this permission notice shall be included |
aravindsv | 0:ba7650f404af | 12 | * in all copies or substantial portions of the Software. |
aravindsv | 0:ba7650f404af | 13 | * |
aravindsv | 0:ba7650f404af | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
aravindsv | 0:ba7650f404af | 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
aravindsv | 0:ba7650f404af | 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
aravindsv | 0:ba7650f404af | 17 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
aravindsv | 0:ba7650f404af | 18 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
aravindsv | 0:ba7650f404af | 19 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
aravindsv | 0:ba7650f404af | 20 | * OTHER DEALINGS IN THE SOFTWARE. |
aravindsv | 0:ba7650f404af | 21 | * |
aravindsv | 0:ba7650f404af | 22 | * Except as contained in this notice, the name of Maxim Integrated |
aravindsv | 0:ba7650f404af | 23 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
aravindsv | 0:ba7650f404af | 24 | * Products, Inc. Branding Policy. |
aravindsv | 0:ba7650f404af | 25 | * |
aravindsv | 0:ba7650f404af | 26 | * The mere transfer of this software does not imply any licenses |
aravindsv | 0:ba7650f404af | 27 | * of trade secrets, proprietary technology, copyrights, patents, |
aravindsv | 0:ba7650f404af | 28 | * trademarks, maskwork rights, or any other form of intellectual |
aravindsv | 0:ba7650f404af | 29 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
aravindsv | 0:ba7650f404af | 30 | * ownership rights. |
aravindsv | 0:ba7650f404af | 31 | ******************************************************************************* |
aravindsv | 0:ba7650f404af | 32 | */ |
aravindsv | 0:ba7650f404af | 33 | |
aravindsv | 0:ba7650f404af | 34 | #ifndef MBED_OBJECTS_H |
aravindsv | 0:ba7650f404af | 35 | #define MBED_OBJECTS_H |
aravindsv | 0:ba7650f404af | 36 | |
aravindsv | 0:ba7650f404af | 37 | #include "cmsis.h" |
aravindsv | 0:ba7650f404af | 38 | #include "PortNames.h" |
aravindsv | 0:ba7650f404af | 39 | #include "PeripheralNames.h" |
aravindsv | 0:ba7650f404af | 40 | #include "PinNames.h" |
aravindsv | 0:ba7650f404af | 41 | #include "gpio_object.h" |
aravindsv | 0:ba7650f404af | 42 | #include "gpio_regs.h" |
aravindsv | 0:ba7650f404af | 43 | #include "uart_regs.h" |
aravindsv | 0:ba7650f404af | 44 | #include "i2cm_regs.h" |
aravindsv | 0:ba7650f404af | 45 | #include "spi_regs.h" |
aravindsv | 0:ba7650f404af | 46 | #include "pt_regs.h" |
aravindsv | 0:ba7650f404af | 47 | #include "adc_regs.h" |
aravindsv | 0:ba7650f404af | 48 | #include "dac_regs.h" |
aravindsv | 0:ba7650f404af | 49 | |
aravindsv | 0:ba7650f404af | 50 | #ifdef __cplusplus |
aravindsv | 0:ba7650f404af | 51 | extern "C" { |
aravindsv | 0:ba7650f404af | 52 | #endif |
aravindsv | 0:ba7650f404af | 53 | |
aravindsv | 0:ba7650f404af | 54 | struct port_s { |
aravindsv | 0:ba7650f404af | 55 | PortName port; |
aravindsv | 0:ba7650f404af | 56 | uint32_t mask; |
aravindsv | 0:ba7650f404af | 57 | __IO uint32_t *reg_out; |
aravindsv | 0:ba7650f404af | 58 | __I uint32_t *reg_in; |
aravindsv | 0:ba7650f404af | 59 | }; |
aravindsv | 0:ba7650f404af | 60 | |
aravindsv | 0:ba7650f404af | 61 | struct gpio_irq_s { |
aravindsv | 0:ba7650f404af | 62 | uint8_t port; |
aravindsv | 0:ba7650f404af | 63 | uint8_t pin; |
aravindsv | 0:ba7650f404af | 64 | }; |
aravindsv | 0:ba7650f404af | 65 | |
aravindsv | 0:ba7650f404af | 66 | struct serial_s { |
aravindsv | 0:ba7650f404af | 67 | int index; |
aravindsv | 0:ba7650f404af | 68 | mxc_uart_regs_t *uart; |
aravindsv | 0:ba7650f404af | 69 | }; |
aravindsv | 0:ba7650f404af | 70 | |
aravindsv | 0:ba7650f404af | 71 | struct i2c_s { |
aravindsv | 0:ba7650f404af | 72 | int index; |
aravindsv | 0:ba7650f404af | 73 | mxc_i2cm_regs_t *i2c; |
aravindsv | 0:ba7650f404af | 74 | volatile uint16_t *txfifo; |
aravindsv | 0:ba7650f404af | 75 | volatile uint16_t *rxfifo; |
aravindsv | 0:ba7650f404af | 76 | int start_pending; |
aravindsv | 0:ba7650f404af | 77 | int stop_pending; |
aravindsv | 0:ba7650f404af | 78 | }; |
aravindsv | 0:ba7650f404af | 79 | |
aravindsv | 0:ba7650f404af | 80 | struct spi_s { |
aravindsv | 0:ba7650f404af | 81 | int index; |
aravindsv | 0:ba7650f404af | 82 | mxc_spi_regs_t *spi; |
aravindsv | 0:ba7650f404af | 83 | mxc_spi_rxfifo_regs_t *rxfifo; |
aravindsv | 0:ba7650f404af | 84 | mxc_spi_txfifo_regs_t *txfifo; |
aravindsv | 0:ba7650f404af | 85 | }; |
aravindsv | 0:ba7650f404af | 86 | |
aravindsv | 0:ba7650f404af | 87 | struct pwmout_s { |
aravindsv | 0:ba7650f404af | 88 | mxc_pt_regs_t *pwm; |
aravindsv | 0:ba7650f404af | 89 | int period; |
aravindsv | 0:ba7650f404af | 90 | int pulse_width; |
aravindsv | 0:ba7650f404af | 91 | }; |
aravindsv | 0:ba7650f404af | 92 | |
aravindsv | 0:ba7650f404af | 93 | struct analogin_s { |
aravindsv | 0:ba7650f404af | 94 | mxc_adc_regs_t *adc; |
aravindsv | 0:ba7650f404af | 95 | mxc_adccfg_regs_t *adccfg; |
aravindsv | 0:ba7650f404af | 96 | mxc_adc_fifo_regs_t * adc_fifo; |
aravindsv | 0:ba7650f404af | 97 | PinName adc_pin; |
aravindsv | 0:ba7650f404af | 98 | }; |
aravindsv | 0:ba7650f404af | 99 | |
aravindsv | 0:ba7650f404af | 100 | struct dac_s { |
aravindsv | 0:ba7650f404af | 101 | int index; |
aravindsv | 0:ba7650f404af | 102 | uint16_t out; |
aravindsv | 0:ba7650f404af | 103 | mxc_dac_regs_t *dac; |
aravindsv | 0:ba7650f404af | 104 | mxc_dac_fifo_t * dac_fifo; |
aravindsv | 0:ba7650f404af | 105 | }; |
aravindsv | 0:ba7650f404af | 106 | |
aravindsv | 0:ba7650f404af | 107 | typedef struct { |
aravindsv | 0:ba7650f404af | 108 | volatile uint32_t *reg_req; |
aravindsv | 0:ba7650f404af | 109 | volatile uint32_t *reg_ack; |
aravindsv | 0:ba7650f404af | 110 | uint32_t req_val; |
aravindsv | 0:ba7650f404af | 111 | uint32_t ack_mask; |
aravindsv | 0:ba7650f404af | 112 | } pin_function_t; |
aravindsv | 0:ba7650f404af | 113 | |
aravindsv | 0:ba7650f404af | 114 | #ifdef __cplusplus |
aravindsv | 0:ba7650f404af | 115 | } |
aravindsv | 0:ba7650f404af | 116 | #endif |
aravindsv | 0:ba7650f404af | 117 | |
aravindsv | 0:ba7650f404af | 118 | #endif |