Skip to content

Commit 8c28917

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature_multi_emac
2 parents 2a68188 + 067fe9b commit 8c28917

File tree

47 files changed

+342
-2329
lines changed

Some content is hidden

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

47 files changed

+342
-2329
lines changed

features/unsupported/USBDevice/USBAudio/USBAudio.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,13 @@ bool USBAudio::write(uint8_t * buf) {
113113
return true;
114114
}
115115

116-
void USBAudio::writeSync(uint8_t *buf)
116+
void USBAudio::writeSync(uint8_t *buf, AudioSampleCorrectType jitter_nb)
117117
{
118-
USBDevice::writeNB(EPISO_IN, buf, PACKET_SIZE_ISO_OUT, PACKET_SIZE_ISO_OUT);
118+
if ((jitter_nb != RemoveOneSample) && (jitter_nb != AddOneSample)) {
119+
jitter_nb = NoCorrection;
120+
}
121+
/* each sample is 2 bytes */
122+
USBDevice::writeNB(EPISO_IN, buf, PACKET_SIZE_ISO_OUT + jitter_nb *(this->channel_nb_out*2), PACKET_SIZE_ISO_OUT+this->channel_nb_out*2);
119123
}
120124

121125
uint32_t USBAudio::readSync(uint8_t *buf)
@@ -195,7 +199,7 @@ bool USBAudio::USBCallback_setConfiguration(uint8_t configuration) {
195199

196200
// Configure isochronous endpoint
197201
realiseEndpoint(EPISO_OUT, PACKET_SIZE_ISO_IN, ISOCHRONOUS);
198-
realiseEndpoint(EPISO_IN, PACKET_SIZE_ISO_OUT, ISOCHRONOUS);
202+
realiseEndpoint(EPISO_IN, PACKET_SIZE_ISO_OUT+this->channel_nb_out*2, ISOCHRONOUS);
199203

200204
// activate readings on this endpoint
201205
readStart(EPISO_OUT, PACKET_SIZE_ISO_IN);
@@ -597,8 +601,8 @@ uint8_t * USBAudio::configurationDesc() {
597601
ENDPOINT_DESCRIPTOR, // bDescriptorType
598602
PHY_TO_DESC(EPISO_IN), // bEndpointAddress
599603
E_ISOCHRONOUS, // bmAttributes
600-
(uint8_t)(LSB(PACKET_SIZE_ISO_OUT)), // wMaxPacketSize
601-
(uint8_t)(MSB(PACKET_SIZE_ISO_OUT)), // wMaxPacketSize
604+
(uint8_t)(LSB(PACKET_SIZE_ISO_OUT+channel_nb_out*2)), // wMaxPacketSize
605+
(uint8_t)(MSB(PACKET_SIZE_ISO_OUT+channel_nb_out*2)), // wMaxPacketSize
602606
0x01, // bInterval
603607
0x00, // bRefresh
604608
0x00, // bSynchAddress

features/unsupported/USBDevice/USBAudio/USBAudio.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,18 @@ class USBAudio: public USBDevice {
123123
*/
124124
bool write(uint8_t * buf);
125125

126+
/** Audio Jitter value*/
127+
enum AudioSampleCorrectType {
128+
RemoveOneSample = -1,
129+
NoCorrection = 0,
130+
AddOneSample = 1
131+
};
126132
/**
127133
* Write packet in endpoint fifo. assuming tx fifo is empty
128134
* @param buf pointer on the audio packet which will be sent
129-
*/
130-
void writeSync(uint8_t *buf);
135+
* @param jitter_nb : AudioSampleCorrecttype
136+
**/
137+
void writeSync(uint8_t *buf, AudioSampleCorrectType jitter_nb = NoCorrection );
131138

132139
/**
133140
* Write and read an audio packet at the same time (on the same frame)

features/unsupported/USBHost/USBHostHub/USBHostHub.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ void USBHostHub::portReset(uint8_t port) {
227227
#endif
228228
while(1) {
229229
status = getPortStatus(port);
230+
/* disconnection since reset request */
231+
if (!(status & PORT_CONNECTION))
232+
break;
230233
if (status & (PORT_ENABLE | PORT_RESET))
231234
break;
232235
if (status & PORT_OVER_CURRENT) {

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K66F/device/TOOLCHAIN_GCC_ARM/MK66FN2M0xxx18.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ SECTIONS
223223
. = ALIGN(4);
224224
__bss_end__ = .;
225225
__END_BSS = .;
226-
} > m_data
226+
} > m_data_2
227227

228228
.heap :
229229
{

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KW24D/TARGET_FRDM/PeripheralPins.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ const PinMap PinMap_UART_TX[] = {
5757
{PTA2, UART_0, 2},
5858
{PTD7, UART_0, 3},
5959
{PTC4, UART_1, 3},
60-
{PTE0, UART_1, 3},
60+
{PTE0, UART_1, 3},
6161
{PTD3, UART_2, 3},
6262
{PTE16, UART_2, 3},
6363
{NC , NC , 0}
6464
};
6565

6666
const PinMap PinMap_UART_RX[] = {
67-
{PTA1, UART_0, 2},
67+
{PTA1, UART_0, 2},
6868
{PTD6, UART_0, 3},
6969
{PTE1, UART_1, 3},
7070
{PTD2, UART_2, 3},
@@ -92,6 +92,7 @@ const PinMap PinMap_UART_RTS[] = {
9292

9393
/************SPI***************/
9494
const PinMap PinMap_SPI_SCLK[] = {
95+
{PTB11, SPI_1, 2},
9596
{PTC5, SPI_0, 2},
9697
{PTD1, SPI_0, 2},
9798
{PTE2, SPI_1, 2},
@@ -100,6 +101,7 @@ const PinMap PinMap_SPI_SCLK[] = {
100101
};
101102

102103
const PinMap PinMap_SPI_MOSI[] = {
104+
{PTB16, SPI_1, 2},
103105
{PTC6, SPI_0, 2},
104106
{PTD2, SPI_0, 2},
105107
{PTE1, SPI_1, 2},
@@ -109,6 +111,7 @@ const PinMap PinMap_SPI_MOSI[] = {
109111
};
110112

111113
const PinMap PinMap_SPI_MISO[] = {
114+
{PTB17, SPI_1, 2},
112115
{PTC7, SPI_0, 2},
113116
{PTD3, SPI_0, 2},
114117
{PTE1, SPI_1, 7},
@@ -118,6 +121,7 @@ const PinMap PinMap_SPI_MISO[] = {
118121
};
119122

120123
const PinMap PinMap_SPI_SSEL[] = {
124+
{PTB10, SPI_1, 2},
121125
{PTC4, SPI_0, 2},
122126
{PTE4, SPI_1, 2},
123127
{PTE16, SPI_0, 2},

targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KW24D/TARGET_FRDM/PinNames.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,16 @@ typedef enum {
8787
USBTX = PTE0,
8888
USBRX = PTE1,
8989

90+
// Not connected
91+
NC = (int)0xFFFFFFFF,
92+
9093
// Arduino Headers
9194
D0 = PTD7,
9295
D1 = PTD6,
9396
D2 = PTD5,
9497
D3 = PTD4,
98+
D4 = NC,
99+
D5 = NC,
95100
D6 = PTE4,
96101
D7 = PTD1,
97102
D8 = PTA19,
@@ -106,8 +111,12 @@ typedef enum {
106111
I2C_SCL = D15,
107112
I2C_SDA = D14,
108113

109-
// Not connected
110-
NC = (int)0xFFFFFFFF
114+
A0 = NC,
115+
A1 = NC,
116+
A2 = NC,
117+
A3 = NC,
118+
A4 = NC,
119+
A5 = NC
111120
} PinName;
112121

113122

targets/TARGET_NORDIC/TARGET_NRF5/serial_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,13 @@ void UART_IRQ_HANDLER(void)
199199

200200
#if DEVICE_SERIAL_ASYNCH
201201
if (UART_CB.tx_active) {
202-
if (++UART_CB.tx_pos <= UART_CB.tx_length) {
202+
if (UART_CB.tx_pos < UART_CB.tx_length) {
203203
// When there is still something to send, clear the TXDRDY event
204204
// and put next byte to transmitter.
205205
nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_TXDRDY);
206206
nrf_uart_txd_set(UART_INSTANCE,
207207
UART_CB.tx_buffer[UART_CB.tx_pos]);
208+
UART_CB.tx_pos++;
208209
}
209210
else {
210211
// When the TXDRDY event is set after the last byte to be sent

targets/TARGET_NORDIC/TARGET_NRF5_SDK13/sdk/drivers_nrf/nrf_soc_nosd/nrf_error.h

Lines changed: 0 additions & 86 deletions
This file was deleted.

targets/TARGET_NORDIC/TARGET_NRF5_SDK13/sdk/drivers_nrf/nrf_soc_nosd/nrf_nvic.c

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)