Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update to latest F4, F7 firmware and USB host/device middleware#1027

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fpistm merged 12 commits intostm32duino:masterfromfpistm:UpdateCubeFw
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
12 commits
Select commitHold shift + click to select a range
56c8d04
[F4] Update STM32F4xx HAL Drivers to v1.7.8
fpistmApr 6, 2020
6f6e64f
[F4] Update STM32F4xx CMSIS Drivers to v2.6.5
fpistmApr 6, 2020
58c8b12
[F4] Update wrapped files
fpistmApr 6, 2020
b766ee7
[F4] Fix HAL_RCC_USART3 definition for STM32F412Cx
fpistmMar 6, 2020
adabe23
[F4] I2C HAL fix: generate Start only once Stop is finished
ABOSTMJan 28, 2020
ea77445
[F7] Update STM32F7xx HAL Drivers to v1.2.8
fpistmApr 6, 2020
d0f4889
[F7] Update STM32F7xx CMSIS Drivers to v1.2.5
fpistmApr 6, 2020
b74759b
Update CMSIS Cortex-Mx Device Peripheral Access Layer System Source File
fpistmApr 6, 2020
52642d9
[USB] Update STM32 USB Device library to v2.6.0
fpistmApr 6, 2020
07b50a8
[USB] Update STM32 USB Host library to v3.3.4
fpistmApr 6, 2020
fe50080
[USBD] Update after middleware update to 2.6.0
fpistmApr 6, 2020
2790e61
[USB] Fix EPO STALL issue in STM32 USB Device library
fpistmJun 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionscores/arduino/stm32/LL/stm32yyxx_ll.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,6 +22,7 @@
#include "stm32yyxx_ll_exti.h"
#include "stm32yyxx_ll_fmac.h"
#include "stm32yyxx_ll_fmc.h"
#include "stm32yyxx_ll_fmpi2c.h"
#include "stm32yyxx_ll_fsmc.h"
#include "stm32yyxx_ll_gpio.h"
#include "stm32yyxx_ll_hrtim.h"
Expand Down
12 changes: 12 additions & 0 deletionscores/arduino/stm32/LL/stm32yyxx_ll_fmpi2c.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
#ifndef _STM32YYXX_LL_FMPI2C_H_
#define _STM32YYXX_LL_FMPI2C_H_
/* LL raised several warnings, ignore them */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"

#ifdef STM32F4xx
#include "stm32f4xx_ll_fmpi2c.h"
#endif
#pragma GCC diagnostic pop
#endif /* _STM32YYXX_LL_FMPI2C_H_ */
747 changes: 356 additions & 391 deletionscores/arduino/stm32/usb/cdc/usbd_cdc.c
View file
Open in desktop

Large diffs are not rendered by default.

19 changes: 6 additions & 13 deletionscores/arduino/stm32/usb/cdc/usbd_cdc.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, 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.st.com/SLA0044
* www.st.com/SLA0044
*
******************************************************************************
*/
Expand DownExpand Up@@ -95,8 +95,7 @@ typedef struct _USBD_CDC_Itf {
int8_t (* DeInit)(void);
int8_t (* Control)(uint8_t cmd, uint8_t *pbuf, uint16_t length);
int8_t (* Receive)(uint8_t *Buf, uint32_t *Len);
int8_t (* Transferred)(void);

int8_t (* TransmitCplt)(uint8_t *Buf, uint32_t *Len, uint8_t epnum);
} USBD_CDC_ItfTypeDef;


Expand All@@ -111,8 +110,7 @@ typedef struct {

__IO uint32_t TxState;
__IO uint32_t RxState;
}
USBD_CDC_HandleTypeDef;
} USBD_CDC_HandleTypeDef;



Expand DownExpand Up@@ -140,17 +138,12 @@ extern USBD_ClassTypeDef USBD_CDC;
uint8_t USBD_CDC_RegisterInterface(USBD_HandleTypeDef *pdev,
USBD_CDC_ItfTypeDef *fops);

uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev,
uint8_t *pbuff,
uint16_t length);

uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev,
uint8_t *pbuff);
uint8_t USBD_CDC_SetTxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff,
uint32_t length);

uint8_t USBD_CDC_SetRxBuffer(USBD_HandleTypeDef *pdev, uint8_t *pbuff);
uint8_t USBD_CDC_ReceivePacket(USBD_HandleTypeDef *pdev);

uint8_t USBD_CDC_ClearBuffer(USBD_HandleTypeDef *pdev);

uint8_t USBD_CDC_TransmitPacket(USBD_HandleTypeDef *pdev);
/**
* @}
Expand Down
43 changes: 29 additions & 14 deletionscores/arduino/stm32/usb/cdc/usbd_cdc_if.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, 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.st.com/SLA0044
* www.st.com/SLA0044
*
******************************************************************************
*/
Expand DownExpand Up@@ -67,14 +67,14 @@ static int8_t USBD_CDC_Init(void);
static int8_t USBD_CDC_DeInit(void);
static int8_t USBD_CDC_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length);
static int8_t USBD_CDC_Receive(uint8_t *pbuf, uint32_t *Len);
static int8_tUSBD_CDC_Transferred(void);
static int8_tUSBD_CDC_TransmitCplt(uint8_t *pbuf, uint32_t *Len, uint8_t epnum);

USBD_CDC_ItfTypeDef USBD_CDC_fops = {
USBD_CDC_Init,
USBD_CDC_DeInit,
USBD_CDC_Control,
USBD_CDC_Receive,
USBD_CDC_Transferred
USBD_CDC_TransmitCplt
};

USBD_CDC_LineCodingTypeDef linecoding = {
Expand All@@ -100,7 +100,7 @@ static int8_t USBD_CDC_Init(void)
receivePended = true;
USBD_CDC_SetRxBuffer(&hUSBD_Device_CDC, CDC_ReceiveQueue_ReserveBlock(&ReceiveQueue));

return (USBD_OK);
return ((int8_t)USBD_OK);
}

/**
Expand All@@ -111,7 +111,7 @@ static int8_t USBD_CDC_Init(void)
*/
static int8_t USBD_CDC_DeInit(void)
{
return (USBD_OK);
return ((int8_t)USBD_OK);
}


Expand DownExpand Up@@ -201,7 +201,7 @@ static int8_t USBD_CDC_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length)
break;
}

return (USBD_OK);
return ((int8_t)USBD_OK);
}

/**
Expand All@@ -211,7 +211,7 @@ static int8_t USBD_CDC_Control(uint8_t cmd, uint8_t *pbuf, uint16_t length)
*
* @note
* This function will issue a NAK packet on any OUT packet received on
* USB endpointuntill exiting this function. If you exit this function
* USB endpointuntil exiting this function. If you exit this function
* before transfer is complete on CDC interface (ie. using DMA controller)
* it will result in receiving more data while previous ones are still
* not sent.
Expand All@@ -237,16 +237,31 @@ static int8_t USBD_CDC_Receive(uint8_t *Buf, uint32_t *Len)
if (!CDC_resume_receive()) {
USBD_CDC_ClearBuffer(&hUSBD_Device_CDC);
}
return USBD_OK;
return((int8_t)USBD_OK);
}


static int8_t USBD_CDC_Transferred(void)
/**
* @brief USBD_CDC_TransmitCplt
* Data transmited callback
*
* @note
* This function is IN transfer complete callback used to inform user that
* the submitted Data is successfully sent over USB.
*
* @param Buf: Buffer of data to be received
* @param Len: Number of data received (in bytes)
* @retval Result of the operation: USBD_OK if all operations are OK else USBD_FAIL
*/
static int8_t USBD_CDC_TransmitCplt(uint8_t *Buf, uint32_t *Len, uint8_t epnum)
{
UNUSED(Buf);
UNUSED(Len);
UNUSED(epnum);
transmitStart = 0;
CDC_TransmitQueue_CommitRead(&TransmitQueue);
CDC_continue_transmit();
return (USBD_OK);
return ((int8_t)USBD_OK);
}

void CDC_init(void)
Expand DownExpand Up@@ -284,9 +299,9 @@ bool CDC_connected()
if (transmitTime) {
transmitTime = HAL_GetTick() - transmitTime;
}
return hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED
&& transmitTime < USB_CDC_TRANSMIT_TIMEOUT
&& lineState;
return((hUSBD_Device_CDC.dev_state == USBD_STATE_CONFIGURED)
&&(transmitTime < USB_CDC_TRANSMIT_TIMEOUT)
&& lineState);
}

void CDC_continue_transmit(void)
Expand All@@ -296,7 +311,7 @@ void CDC_continue_transmit(void)
USBD_CDC_HandleTypeDef *hcdc = (USBD_CDC_HandleTypeDef *) hUSBD_Device_CDC.pClassData;
/*
* TS: This method can be called both in the main thread
* (via USBSerial::write) and in the IRQ stream (viaUSBD_CDC_Transferred),
* (via USBSerial::write) and in the IRQ stream (viaUSBD_CDC_TransmistCplt),
* BUT the main thread cannot pass this condition while waiting for a IRQ!
* This is not possible because TxState is not zero while waiting for data
* transfer ending! The IRQ thread is uninterrupted, since its priority
Expand Down
2 changes: 1 addition & 1 deletioncores/arduino/stm32/usb/cdc/usbd_cdc_if.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, 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.st.com/SLA0044
* www.st.com/SLA0044
*
******************************************************************************
*/
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp