Merge pull request #10166 from cmonr/astyle-fix

Travis CI: Tweak astyle to not over-exclude files
pull/10200/head
Martin Kojtal 2019-03-22 06:36:07 +01:00 committed by GitHub
commit e7987a9f04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 163 additions and 158 deletions

View File

@ -1,29 +1,29 @@
BUILD ./BUILD
cmsis ./cmsis
features/cryptocell ./components/802.15.4_RF
features/mbedtls ./components/TARGET_PSA/services/attestation/attestation.h
features/lwipstack/lwip ./components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl
features/lwipstack/lwip-sys ./components/TARGET_PSA/services/attestation/qcbor
rtos/TARGET_CORTEX/rtx4 ./components/TARGET_PSA/TARGET_TFM
features/storage/filesystem/littlefs/littlefs/ ./components/TARGET_PSA/TESTS
features/storage/filesystem/fat/ChaN ./features/cryptocell
features/storage/FEATURE_STORAGE ./features/FEATURE_BLE
features/frameworks ./features/frameworks
features/FEATURE_BLE ./features/lwipstack/lwip
features/unsupported/ ./features/lwipstack/lwip-sys
features/netsocket/emac-drivers ./features/mbedtls
hal/storage_abstraction ./features/nanostack/coap-service
TESTS/mbed_hal/trng/pithy ./features/nanostack/sal-stack-nanostack
features/nanostack/coap-service ./features/nanostack/targets
features/nanostack/sal-stack-nanostack ./features/netsocket/emac-drivers
features/nanostack/targets ./features/storage/FEATURE_STORAGE
rtos/TARGET_CORTEX/rtx5 ./features/storage/filesystem/fat/ChaN
TESTS/mbed_hal/trng/pithy ./features/storage/filesystem/littlefs/littlefs/
targets ./features/unsupported/
components/802.15.4_RF ./hal/storage_abstraction
components/TARGET_PSA/TARGET_TFM ./rtos/TARGET_CORTEX/rtx4
tools ./rtos/TARGET_CORTEX/rtx5
components/TARGET_PSA/TESTS ./targets
components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl ./TESTS/mbed_hal/trng/pithy
components/TARGET_PSA/services/attestation/qcbor ./TESTS/mbed_hal/trng/pithy
components/TARGET_PSA/services/attestation/attestation.h ./tools

View File

@ -96,7 +96,8 @@ static ctrl_xfer_t ctrl_xfer = CTRL_XFER_READY;
static uint32_t Data1 = 0x55555555; static uint32_t Data1 = 0x55555555;
static uint32_t frameNumber() { static uint32_t frameNumber()
{
return ((USB0->FRMNUML | (USB0->FRMNUMH << 8)) & 0x07FF); return ((USB0->FRMNUML | (USB0->FRMNUMH << 8)) & 0x07FF);
} }
@ -466,8 +467,7 @@ bool USBPhyHw::endpoint_read_core(usb_ep_t endpoint, uint32_t max_packet)
bdt[idx].byte_count = max_packet; bdt[idx].byte_count = max_packet;
if ((Data1 >> DESC_TO_PHY(endpoint)) & 1) { if ((Data1 >> DESC_TO_PHY(endpoint)) & 1) {
bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK | BD_DATA01_MASK; bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK | BD_DATA01_MASK;
} } else {
else {
bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK; bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK;
} }
@ -632,8 +632,9 @@ void USBPhyHw::process()
// stall interrupt // stall interrupt
if (istat & 1 << 7) { if (istat & 1 << 7) {
if (USB0->ENDPOINT[0].ENDPT & USB_ENDPT_EPSTALL_MASK) if (USB0->ENDPOINT[0].ENDPT & USB_ENDPT_EPSTALL_MASK) {
USB0->ENDPOINT[0].ENDPT &= ~USB_ENDPT_EPSTALL_MASK; USB0->ENDPOINT[0].ENDPT &= ~USB_ENDPT_EPSTALL_MASK;
}
USB0->ISTAT = USB_ISTAT_STALL_MASK; USB0->ISTAT = USB_ISTAT_STALL_MASK;
} }
@ -660,9 +661,9 @@ void USBPhyHw::process()
} else { } else {
// OUT packet // OUT packet
if (rx_en && (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == OUT_TOKEN)) { if (rx_en && (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == OUT_TOKEN)) {
if (num == 0) if (num == 0) {
events->ep0_out(); events->ep0_out();
else { } else {
epComplete |= EP(phy_ep); epComplete |= EP(phy_ep);
events->out(PHY_TO_DESC(phy_ep)); events->out(PHY_TO_DESC(phy_ep));
} }
@ -676,8 +677,7 @@ void USBPhyHw::process()
USB0->ADDR = addr & 0x7F; USB0->ADDR = addr & 0x7F;
set_addr = 0; set_addr = 0;
} }
} } else {
else {
epComplete |= EP(phy_ep); epComplete |= EP(phy_ep);
events->in(PHY_TO_DESC(phy_ep)); events->in(PHY_TO_DESC(phy_ep));
} }
@ -713,7 +713,8 @@ void USBPhyHw::process()
NVIC_EnableIRQ(USB0_IRQn); NVIC_EnableIRQ(USB0_IRQn);
} }
void USBPhyHw::_usbisr(void) { void USBPhyHw::_usbisr(void)
{
NVIC_DisableIRQ(USB0_IRQn); NVIC_DisableIRQ(USB0_IRQn);
instance->events->start_process(); instance->events->start_process();
} }

View File

@ -502,11 +502,17 @@ bool USBPhyHw::endpoint_read(usb_ep_t endpoint, uint8_t *data, uint32_t size)
/* Set Transaction counter */ /* Set Transaction counter */
p_reg = get_pipetre_reg(pipe); p_reg = get_pipetre_reg(pipe);
if (p_reg != NULL) *p_reg |= USB_TRCLR; if (p_reg != NULL) {
*p_reg |= USB_TRCLR;
}
p_reg = get_pipetrn_reg(pipe); p_reg = get_pipetrn_reg(pipe);
if (p_reg != NULL) *p_reg = trncnt; if (p_reg != NULL) {
*p_reg = trncnt;
}
p_reg = get_pipetre_reg(pipe); p_reg = get_pipetre_reg(pipe);
if (p_reg != NULL) *p_reg |= USB_TRENB; if (p_reg != NULL) {
*p_reg |= USB_TRENB;
}
p_reg = get_pipectr_reg(pipe); p_reg = get_pipectr_reg(pipe);
/* Buffer Clear */ /* Buffer Clear */
@ -701,14 +707,12 @@ void USBPhyHw::process()
} }
events->ep0_out(); events->ep0_out();
} }
} } else if (((ists0 & USB_BEMP) == USB_BEMP) && ((ests & USB_BEMP0) == USB_BEMP0)) {
else if (((ists0 & USB_BEMP) == USB_BEMP) && ((ests & USB_BEMP0) == USB_BEMP0)) {
/* ==== BEMP PIPE0 ==== */ /* ==== BEMP PIPE0 ==== */
USB_MX.BEMPSTS = (uint16_t)((~USB_BEMP0) & BEMPSTS_MASK); USB_MX.BEMPSTS = (uint16_t)((~USB_BEMP0) & BEMPSTS_MASK);
events->ep0_in(); events->ep0_in();
} } else if (((ists0 & USB_NRDY) == USB_NRDY) && ((nsts & USB_NRDY0) == USB_NRDY0)) {
else if (((ists0 & USB_NRDY) == USB_NRDY) && ((nsts & USB_NRDY0) == USB_NRDY0)) {
/* ==== NRDY PIPE0 ==== */ /* ==== NRDY PIPE0 ==== */
USB_MX.NRDYSTS = (uint16_t)((~USB_NRDY0) & NRDYSTS_MASK); USB_MX.NRDYSTS = (uint16_t)((~USB_NRDY0) & NRDYSTS_MASK);
/* Non processing. */ /* Non processing. */
@ -783,8 +787,7 @@ void USBPhyHw::process()
} }
} }
} }
} } else if ((ists0 & USB_BEMP) == USB_BEMP) {
else if ((ists0 & USB_BEMP) == USB_BEMP) {
/* ==== BEMP PIPEx ==== */ /* ==== BEMP PIPEx ==== */
USB_MX.BEMPSTS = (uint16_t)((~ests) & BEMPSTS_MASK); USB_MX.BEMPSTS = (uint16_t)((~ests) & BEMPSTS_MASK);
@ -806,8 +809,7 @@ void USBPhyHw::process()
} }
} }
} }
} } else if ((ists0 & USB_NRDY) == USB_NRDY) {
else if ((ists0 & USB_NRDY) == USB_NRDY) {
/* ==== NRDY PIPEx ==== */ /* ==== NRDY PIPEx ==== */
USB_MX.NRDYSTS = (uint16_t)((~nsts) & NRDYSTS_MASK); USB_MX.NRDYSTS = (uint16_t)((~nsts) & NRDYSTS_MASK);
@ -821,8 +823,7 @@ void USBPhyHw::process()
} }
} }
} }
} } else {
else {
/* Non processing. */ /* Non processing. */
} }
} }

View File

@ -53,8 +53,7 @@ uint32_t HAL_PCDEx_GetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo)
uint32_t len; uint32_t len;
if (fifo == 0) { if (fifo == 0) {
len = hpcd->Instance->DIEPTXF0_HNPTXFSIZ >> 16; len = hpcd->Instance->DIEPTXF0_HNPTXFSIZ >> 16;
} } else {
else {
len = hpcd->Instance->DIEPTXF[fifo - 1] >> 16; len = hpcd->Instance->DIEPTXF[fifo - 1] >> 16;
} }
return len * 4; return len * 4;
@ -522,7 +521,9 @@ bool USBPhyHw::endpoint_write(usb_ep_t endpoint, uint8_t *data, uint32_t size)
ret = HAL_PCD_EP_Transmit(&hpcd, endpoint, data, size); ret = HAL_PCD_EP_Transmit(&hpcd, endpoint, data, size);
MBED_ASSERT(ret != HAL_BUSY); MBED_ASSERT(ret != HAL_BUSY);
// update the status // update the status
if (ret != HAL_OK) return false; if (ret != HAL_OK) {
return false;
}
// fix me return is too simple // fix me return is too simple
return true; return true;
} }
@ -541,7 +542,8 @@ void USBPhyHw::process()
NVIC_EnableIRQ(USBHAL_IRQn); NVIC_EnableIRQ(USBHAL_IRQn);
} }
void USBPhyHw::_usbisr(void) { void USBPhyHw::_usbisr(void)
{
NVIC_DisableIRQ(USBHAL_IRQn); NVIC_DisableIRQ(USBHAL_IRQn);
instance->events->start_process(); instance->events->start_process();
} }

View File

@ -304,7 +304,8 @@ void USBPhyHw::process()
NVIC_EnableIRQ(USB_IRQn); NVIC_EnableIRQ(USB_IRQn);
} }
void USBPhyHw::_usbisr(void) { void USBPhyHw::_usbisr(void)
{
NVIC_DisableIRQ(USB_IRQn); NVIC_DisableIRQ(USB_IRQn);
instance->events->start_process(); instance->events->start_process();
} }