Skip to content

Commit 9e573d8

Browse files
committed
Update mbed to mbed-os-6.0.0-alpha-3-613-g4e446abdf6
1 parent f934a59 commit 9e573d8

File tree

132 files changed

+197553
-182664
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

+197553
-182664
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2017-2017 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#ifndef CY_H4TRANSPORT_DRIVER_H_
19+
#define CY_H4TRANSPORT_DRIVER_H_
20+
21+
#if (DEVICE_SERIAL && DEVICE_SERIAL_FC) || defined(DOXYGEN_ONLY)
22+
23+
#include <stdint.h>
24+
#include "mbed.h"
25+
#include "CordioHCITransportDriver.h"
26+
#include "drivers/DigitalInOut.h"
27+
28+
namespace ble {
29+
namespace vendor {
30+
namespace cypress_ble {
31+
32+
using namespace ble::vendor;
33+
34+
/**
35+
* Implementation of the H4 driver over Cypress based chips.
36+
*/
37+
class CyH4TransportDriver : public cordio::CordioHCITransportDriver {
38+
public:
39+
/**
40+
* Initialize the transport driver.
41+
*
42+
*/
43+
CyH4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, int baud, PinName bt_host_wake_name, PinName bt_device_wake_name,
44+
uint8_t host_wake_irq = 0, uint8_t dev_wake_irq = 0);
45+
CyH4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, int baud);
46+
47+
/**
48+
* Destructor
49+
*/
50+
virtual ~CyH4TransportDriver();
51+
52+
/**
53+
* @see CordioHCITransportDriver::initialize
54+
*/
55+
virtual void initialize();
56+
57+
/**
58+
* @see CordioHCITransportDriver::terminate
59+
*/
60+
virtual void terminate();
61+
62+
/**
63+
* @see CordioHCITransportDriver::write
64+
*/
65+
virtual uint16_t write(uint8_t type, uint16_t len, uint8_t *pData);
66+
67+
void bt_host_wake_rise_irq_handler();
68+
void bt_host_wake_fall_irq_handler();
69+
70+
#if (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER)
71+
void on_host_stack_inactivity();
72+
#endif
73+
74+
void update_uart_baud_rate(int baud);
75+
76+
bool get_enabled_powersave();
77+
uint8_t get_host_wake_irq_event();
78+
uint8_t get_dev_wake_irq_event();
79+
80+
private:
81+
void assert_bt_dev_wake();
82+
void deassert_bt_dev_wake();
83+
void on_controller_irq();
84+
85+
// Use HAL serial because Cypress UART is buffered.
86+
// The PUTC function does not actually blocks until data is fully transmitted,
87+
// it only blocks until data gets into HW buffer.
88+
// The UART APIs prevents sleep while there are data in the HW buffer.
89+
// However UART APIs does not prevent the BT radio from going to sleep.
90+
// Use the HAL APIs to prevent the radio from going to sleep until UART transmition is complete.
91+
// Mbed layer has no API that distinguish between data in HW buffer v.s. data already transmitted.
92+
93+
UnbufferedSerial uart;
94+
PinName cts;
95+
PinName rts;
96+
PinName bt_host_wake_name;
97+
PinName bt_device_wake_name;
98+
99+
DigitalInOut bt_host_wake;
100+
DigitalInOut bt_device_wake;
101+
bool bt_host_wake_active;
102+
103+
bool enabled_powersave;
104+
uint8_t host_wake_irq_event;
105+
uint8_t dev_wake_irq_event;
106+
107+
bool holding_deep_sleep_lock;
108+
109+
};
110+
111+
} // namespace cypress
112+
} // namespace vendor
113+
} // namespace ble
114+
115+
#define DEF_BT_BAUD_RATE (115200)
116+
#define DEF_BT_3M_BAUD_RATE (3000000) /* Both Host and BT device have to be adapt to this */
117+
118+
#define WAKE_EVENT_ACTIVE_HIGH ( 1 ) /* Interrupt Rising Edge */
119+
#define WAKE_EVENT_ACTIVE_LOW ( 0 ) /* Interrupt Falling Edge */
120+
121+
ble::vendor::cypress_ble::CyH4TransportDriver& ble_cordio_get_default_h4_transport_driver();
122+
ble::vendor::cypress_ble::CyH4TransportDriver& ble_cordio_get_h4_transport_driver();
123+
#endif
124+
#endif /* CY_H4TRANSPORT_DRIVER_H_ */

cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/COMPONENT_WHD/resources/nvram/TARGET_STM32H747xI/wifi_nvram_image.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static const char wifi_nvram_image[] =
4949
NVRAM_GENERATED_MAC_ADDRESS "\x00"
5050
"sromrev=11" "\x00"
5151
"boardflags=0x00404201" "\x00"
52-
"boardflags3=0x08000000" "\x00"
52+
"boardflags3=0x04000000" "\x00"
5353
"xtalfreq=37400" "\x00"
5454
"nocrc=1" "\x00"
5555
"ag0=0" "\x00"

cores/arduino/mbed/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_PORTENTA_H7/PinNames.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,15 @@ typedef enum {
361361
LED2 = LED_GREEN,
362362
LED3 = LED_BLUE,
363363

364+
CYBSP_BT_UART_RX = PF_6,
365+
CYBSP_BT_UART_TX = PA_15,
366+
CYBSP_BT_UART_RTS = PF_8,
367+
CYBSP_BT_UART_CTS = PF_9,
368+
369+
CYBSP_BT_POWER = PJ_12,
370+
CYBSP_BT_HOST_WAKE = PJ_13,
371+
CYBSP_BT_DEVICE_WAKE = PJ_14,
372+
364373
USER_BUTTON = PC_13,
365374
// Standardized button names
366375
BUTTON1 = USER_BUTTON,

0 commit comments

Comments
 (0)