Skip to content

Commit c9dfcfb

Browse files
committed
Update mbed to mbed-os-6.0.0-alpha-3-615-g41c2541014
1 parent cb86cd9 commit c9dfcfb

File tree

132 files changed

+197453
-197419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+197453
-197419
lines changed

cores/arduino/mbed/drivers/AnalogIn.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ class AnalogIn {
8080
*/
8181
AnalogIn(PinName pin);
8282

83+
84+
/** Reconfigure the adc object using the given configuration
85+
*
86+
* @param config reference to structure which holds AnalogIn configuration
87+
*/
88+
void configure(const analogin_config_t &config);
89+
8390
/** Read the input voltage, represented as a float in the range [0.0, 1.0]
8491
*
8592
* @returns A floating-point value representing the current input voltage, measured as a percentage

cores/arduino/mbed/hal/analogin_api.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ extern "C" {
3333
*/
3434
typedef struct analogin_s analogin_t;
3535

36+
/** Analogin configuration hal structure. analogin_config_s is declared in the target's hal
37+
*/
38+
typedef struct analogin_config_s analogin_config_t;
39+
3640
/**
3741
* \defgroup hal_analogin Analogin hal functions
3842
*
@@ -77,6 +81,15 @@ void analogin_init_direct(analogin_t *obj, const PinMap *pinmap);
7781
*/
7882
void analogin_init(analogin_t *obj, PinName pin);
7983

84+
/** Initialize the analogin peripheral
85+
*
86+
* Configures the pin used by analogin.
87+
* @param obj The analogin object to initialize
88+
* @param pin The analogin pin name
89+
* @param pinmap pointer to structure which holds analogin configuration
90+
*/
91+
void __attribute__((weak)) analogin_configure(analogin_t *obj, const analogin_config_t *config);
92+
8093
/** Release the analogin peripheral
8194
*
8295
* Releases the pin used by analogin.

cores/arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
#include "nrfx_spi.h"
4747
#include "nrf_twi.h"
4848

49+
#include "nrf_saadc.h"
50+
4951
#include "nrf_pwm.h"
5052

5153
#ifdef __cplusplus
@@ -140,6 +142,18 @@ struct analogin_s {
140142
uint8_t channel;
141143
};
142144

145+
struct analogin_config_s {
146+
nrf_saadc_resistor_t resistor_p;
147+
nrf_saadc_resistor_t resistor_n;
148+
nrf_saadc_gain_t gain;
149+
nrf_saadc_reference_t reference;
150+
nrf_saadc_acqtime_t acq_time;
151+
nrf_saadc_mode_t mode;
152+
nrf_saadc_burst_t burst;
153+
nrf_saadc_input_t pin_p;
154+
nrf_saadc_input_t pin_n;
155+
};
156+
143157
struct gpio_irq_s {
144158
uint32_t ch;
145159
};

cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/device/stm32h747xx.h

Lines changed: 30234 additions & 30234 deletions
Large diffs are not rendered by default.
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
/**
2-
******************************************************************************
3-
* @file stm32_assert.h
4-
* @author MCD Application Team
5-
* @brief STM32 assert template file.
6-
* This file should be copied to the application folder and renamed
7-
* to stm32_assert.h.
8-
******************************************************************************
9-
* @attention
10-
*
11-
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
12-
* All rights reserved.</center></h2>
13-
*
14-
* This software component is licensed by ST under BSD 3-Clause license,
15-
* the "License"; You may not use this file except in compliance with the
16-
* License. You may obtain a copy of the License at:
17-
* opensource.org/licenses/BSD-3-Clause
18-
*
19-
******************************************************************************
20-
*/
21-
22-
/* Define to prevent recursive inclusion -------------------------------------*/
23-
#ifndef __STM32_ASSERT_H
24-
#define __STM32_ASSERT_H
25-
26-
#ifdef __cplusplus
27-
extern "C" {
28-
#endif
29-
30-
/* Exported types ------------------------------------------------------------*/
31-
/* Exported constants --------------------------------------------------------*/
32-
/* Includes ------------------------------------------------------------------*/
33-
/* Exported macro ------------------------------------------------------------*/
34-
#ifdef USE_FULL_ASSERT
35-
/**
36-
* @brief The assert_param macro is used for function's parameters check.
37-
* @param expr If expr is false, it calls assert_failed function
38-
* which reports the name of the source file and the source
39-
* line number of the call that failed.
40-
* If expr is true, it returns no value.
41-
* @retval None
42-
*/
43-
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
44-
/* Exported functions ------------------------------------------------------- */
45-
void assert_failed(uint8_t* file, uint32_t line);
46-
#else
47-
#define assert_param(expr) ((void)0U)
48-
#endif /* USE_FULL_ASSERT */
49-
50-
#ifdef __cplusplus
51-
}
52-
#endif
53-
54-
#endif /* __STM32_ASSERT_H */
55-
56-
57-
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
1+
/**
2+
******************************************************************************
3+
* @file stm32_assert.h
4+
* @author MCD Application Team
5+
* @brief STM32 assert template file.
6+
* This file should be copied to the application folder and renamed
7+
* to stm32_assert.h.
8+
******************************************************************************
9+
* @attention
10+
*
11+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
12+
* All rights reserved.</center></h2>
13+
*
14+
* This software component is licensed by ST under BSD 3-Clause license,
15+
* the "License"; You may not use this file except in compliance with the
16+
* License. You may obtain a copy of the License at:
17+
* opensource.org/licenses/BSD-3-Clause
18+
*
19+
******************************************************************************
20+
*/
21+
22+
/* Define to prevent recursive inclusion -------------------------------------*/
23+
#ifndef __STM32_ASSERT_H
24+
#define __STM32_ASSERT_H
25+
26+
#ifdef __cplusplus
27+
extern "C" {
28+
#endif
29+
30+
/* Exported types ------------------------------------------------------------*/
31+
/* Exported constants --------------------------------------------------------*/
32+
/* Includes ------------------------------------------------------------------*/
33+
/* Exported macro ------------------------------------------------------------*/
34+
#ifdef USE_FULL_ASSERT
35+
/**
36+
* @brief The assert_param macro is used for function's parameters check.
37+
* @param expr If expr is false, it calls assert_failed function
38+
* which reports the name of the source file and the source
39+
* line number of the call that failed.
40+
* If expr is true, it returns no value.
41+
* @retval None
42+
*/
43+
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
44+
/* Exported functions ------------------------------------------------------- */
45+
void assert_failed(uint8_t* file, uint32_t line);
46+
#else
47+
#define assert_param(expr) ((void)0U)
48+
#endif /* USE_FULL_ASSERT */
49+
50+
#ifdef __cplusplus
51+
}
52+
#endif
53+
54+
#endif /* __STM32_ASSERT_H */
55+
56+
57+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)