Skip to content

Commit

Permalink
feat: merge upstream changes (#126)
Browse files Browse the repository at this point in the history
* Merged PR 10874: UartStmDuplexDma: Disable DMA reception on destructor

UartStmDuplexDma: Disable DMA reception on destructor
(cherry picked from commit 6b0edbbff0212e2c5dfca9361aa912a8513d9105)

* Merged PR 10894: UartStmDuplexDma: Fix default DMA channels for RX as listed in RM0410, Table 28

UartStmDuplexDma: Fix default DMA channels for RX as listed in RM0410, Table 28
(cherry picked from commit 354b5164c5f37d702ea1e509e38d08e498a58280)

* Merged PR 10899: DmaStm: Disable interrupts on DMA stop transfer to prevent core/bus lock up

DmaStm: Disable interrupts on DMA stop transfer to prevent core/bus lock up
(cherry picked from commit e1cf4a456a6aae420523d99917137965756da0b8)

* Merged PR 10988: Update security related GAP interfaces after changes to services::Gap interface

(cherry picked from commit f5da21bbee6503a0a08e5aeeedbda28b96ae0468)

* Merged PR 10989: [ECR] - GapPeripheralSt changed to use the updated services::Gap

GapPeripheralSt updated to use the new services::Gap

(cherry picked from commit 701f391266a3e5ae4d551aa1d548b8eea0f66eb6)

* Merged PR 11019: Implement GapPeripheralSt::SetSecurityMode

Implement GapPeripheralSt::SetSecurityMode

(cherry picked from commit ffb2d8b4ee2d40bf1e4e71015e448f5591973ced)

* Merged PR 11085: [ECR] HalSt updated according the GATT interface

HalSt updated according the GATT interface

(cherry picked from commit c809b11676121f0c12eea92b4b0a2f74755e9829)

* Merged PR 11239: fix gap device name accessibility and size limit

(cherry picked from commit fda9e2f0b00dc03582cb6769d1daff87ecb69ffe)

* Merged PR 11280: Gap device name and device privacy changes

(cherry picked from commit b0efe1ff8357a2238573eb75ae35fa1757f5bce2)

* Merged PR 11328: Added getters to GapPeripheralSt

Added getters to GapPeripheralSt

(cherry picked from commit ff76186ed29060327a4b9bfd42362b94c7dbea0b)

* Merged PR 11353: apply st patch

(cherry picked from commit ec30ab95a14f76e5a0104fe3582fce536f54973b)

* Merged PR 11227: [ECR] GAP Central implementation

- Common logic between central and peripheral was moved to a base class (GapSt)
- GAP Central implemented
- Privacy implemented for central (it was already implemented for peripheral)

* hal_st/middlewares/ble_middleware/GapSt.hpp: Remove incorrect include

* CMakeLists: temporarily use feature/merge-tfs from amp-embedded-infra-lib

* Apply clang-format

* Remove project name from modifications.md

* Remove project name from modifications.md

* .gitgub/workflows/linting-formatting.yml: Disable formatting because it selects the wrong clang format config

* CMakeLists: Update amp-embedded-infra-lib tag used

---------

Co-authored-by: Andre Jordan Botaro de Lima <Andre.JordanBotarodeLima@philips.com>
Co-authored-by: Creemers, Roy <roy.creemers@philips.com>
Co-authored-by: Santos, Gabriel <Gabriel.Santos_1@philips.com>
Co-authored-by: Oguz, Oguzcan <oguz.oguzcan@philips.com>
Co-authored-by: Helling, Stef <stef.helling@philips.com>
  • Loading branch information
6 people authored May 4, 2023
1 parent 51306ab commit 1546f51
Show file tree
Hide file tree
Showing 38 changed files with 1,286 additions and 473 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/linting-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@c3b2c943e924028b93a707a5b1b017976ab8d50c
with:
clangFormatVersion: 14
inplace: true
extensions: "cpp,hpp"
- uses: reviewdog/action-suggester@8f83d27e749053b2029600995c115026a010408e # v1.6.0
with:
tool_name: clang-format
filter_mode: diff_context
#- uses: DoozyX/clang-format-lint-action@c3b2c943e924028b93a707a5b1b017976ab8d50c
# with:
# clangFormatVersion: 14
# inplace: true
# extensions: "cpp,hpp"
#- uses: reviewdog/action-suggester@8f83d27e749053b2029600995c115026a010408e # v1.6.0
# with:
# tool_name: clang-format
# filter_mode: diff_context
linter:
name: Linter
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (HALST_STANDALONE)
FetchContent_Declare(
emil
GIT_REPOSITORY https://github.com/philips-software/amp-embedded-infra-lib.git
GIT_TAG 8e990e6d88c928b402397e4b453df0829f5f7626 # unreleased
GIT_TAG 9856f2304b818f69926db810aabadbd2c1a82659 # Unreleased
)

FetchContent_MakeAvailable(emil)
Expand Down
4 changes: 2 additions & 2 deletions examples/blink/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "hal_st/instantiations/NucleoUi.hpp"
#include "hal_st/instantiations/StmEventInfrastructure.hpp"
//#include "hal_st/stm32fxxx/DefaultClockNucleoF767ZI.hpp"
// #include "hal_st/stm32fxxx/DefaultClockNucleoF767ZI.hpp"
#include "services/util/DebugLed.hpp"

unsigned int hse_value = 8000000;
Expand All @@ -10,7 +10,7 @@ int main()
HAL_Init();

// Configure your clock here
//ConfigureDefaultClockNucleo767ZI();
// ConfigureDefaultClockNucleo767ZI();

static main_::StmEventInfrastructure eventInfrastructure;
static main_::NUCLEO ui;
Expand Down
2 changes: 1 addition & 1 deletion hal_st/instantiations/NucleoUi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace main_
#if defined(STM32L412RB_P) || defined(STM32L433RC_P) || defined(STM32L452RE_P) // Which other targets? UM1724 does not specify which targets use PA5 and which PB13
hal::GpioPinStm ledGreen{ hal::Port::B, 13 };
#else
hal::GpioPinStm ledGreen{ hal::Port::A, 5 }; // STM32G0, STM32G4
hal::GpioPinStm ledGreen{ hal::Port::A, 5 }; // STM32G0, STM32G4
#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ int hci_send_req(struct hci_request *p_cmd, uint8_t async)
NotifyCmdStatus(HCI_TL_CmdBusy);
local_cmd_status = HCI_TL_CmdBusy;
opcode = ((p_cmd->ocf) & 0x03ff) | ((p_cmd->ogf) << 10);

CmdRspStatusFlag = HCI_TL_CMD_RESP_WAIT;
SendCmd(opcode, p_cmd->clen, p_cmd->cparam);

while(local_cmd_status == HCI_TL_CmdBusy)
Expand Down Expand Up @@ -291,7 +293,6 @@ __WEAK void hci_cmd_resp_wait(uint32_t timeout)
{
(void)timeout;

CmdRspStatusFlag = HCI_TL_CMD_RESP_WAIT;
while(CmdRspStatusFlag != HCI_TL_CMD_RESP_RELEASE);

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void shci_send( uint16_t cmd_code, uint8_t len_cmd_payload, uint8_t * p_cmd_payl
pCmdBuffer->cmdserial.cmd.plen = len_cmd_payload;

memcpy(pCmdBuffer->cmdserial.cmd.payload, p_cmd_payload, len_cmd_payload );

CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
shciContext.io.Send(0,0);

shci_cmd_resp_wait(SHCI_TL_DEFAULT_TIMEOUT);
Expand Down Expand Up @@ -237,7 +237,6 @@ __WEAK void shci_cmd_resp_wait(uint32_t timeout)
{
(void)timeout;

CmdRspStatusFlag = SHCI_TL_CMD_RESP_WAIT;
while(CmdRspStatusFlag != SHCI_TL_CMD_RESP_RELEASE);

return;
Expand Down
6 changes: 6 additions & 0 deletions hal_st/middlewares/ble_middleware/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ if ("${TARGET_MCU_VENDOR}" STREQUAL st AND "${TARGET_MCU_FAMILY}" STREQUAL stm32
target_sources(hal_st.ble_middleware PRIVATE
BondStorageSt.cpp
BondStorageSt.hpp
GapCentralSt.cpp
GapCentralSt.hpp
GapPeripheralSt.cpp
GapPeripheralSt.hpp
GapSt.cpp
GapSt.hpp
GattServerSt.cpp
GattServerSt.hpp
HciEventObserver.hpp
SystemTransportLayer.cpp
SystemTransportLayer.hpp
TracingGapCentralSt.cpp
TracingGapCentralSt.hpp
TracingGapPeripheralSt.cpp
TracingGapPeripheralSt.hpp
TracingGattServerSt.cpp
Expand Down
Loading

0 comments on commit 1546f51

Please sign in to comment.