Skip to content

Travis CI: Tweak astyle to not over-exclude files #10166

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 29 additions & 29 deletions .astyleignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
BUILD
cmsis
features/cryptocell
features/mbedtls
features/lwipstack/lwip
features/lwipstack/lwip-sys
rtos/TARGET_CORTEX/rtx4
features/storage/filesystem/littlefs/littlefs/
features/storage/filesystem/fat/ChaN
features/storage/FEATURE_STORAGE
features/frameworks
features/FEATURE_BLE
features/unsupported/
features/netsocket/emac-drivers
hal/storage_abstraction
TESTS/mbed_hal/trng/pithy
features/nanostack/coap-service
features/nanostack/sal-stack-nanostack
features/nanostack/targets
rtos/TARGET_CORTEX/rtx5
TESTS/mbed_hal/trng/pithy
targets
components/802.15.4_RF
components/TARGET_PSA/TARGET_TFM
tools
components/TARGET_PSA/TESTS
components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl
components/TARGET_PSA/services/attestation/qcbor
components/TARGET_PSA/services/attestation/attestation.h
./BUILD
./cmsis
./components/802.15.4_RF
./components/TARGET_PSA/services/attestation/attestation.h
./components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl
./components/TARGET_PSA/services/attestation/qcbor
./components/TARGET_PSA/TARGET_TFM
./components/TARGET_PSA/TESTS
./features/cryptocell
./features/FEATURE_BLE
./features/frameworks
./features/lwipstack/lwip
./features/lwipstack/lwip-sys
./features/mbedtls
./features/nanostack/coap-service
./features/nanostack/sal-stack-nanostack
./features/nanostack/targets
./features/netsocket/emac-drivers
./features/storage/FEATURE_STORAGE
./features/storage/filesystem/fat/ChaN
./features/storage/filesystem/littlefs/littlefs/
./features/unsupported/
./hal/storage_abstraction
./rtos/TARGET_CORTEX/rtx4
./rtos/TARGET_CORTEX/rtx5
./targets
./TESTS/mbed_hal/trng/pithy
./TESTS/mbed_hal/trng/pithy
./tools
2 changes: 1 addition & 1 deletion TESTS/mbed_hal/stack_size_unification/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2019-2019 ARM Limited
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2019-2019 ARM Limited
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion usb/device/targets/TARGET_Freescale/USBPhyHw.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class USBPhyHw : public USBPhy {
virtual void sof_disable();
virtual void set_address(uint8_t address);
virtual void remote_wakeup();
virtual const usb_ep_table_t* endpoint_table();
virtual const usb_ep_table_t *endpoint_table();

virtual uint32_t ep0_set_max_packet(uint32_t max_packet);
virtual void ep0_setup_read_result(uint8_t *buffer, uint32_t size);
Expand Down
63 changes: 32 additions & 31 deletions usb/device/targets/TARGET_Freescale/USBPhy_Kinetis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ typedef enum {
// * as there are ODD and EVEN buffer -> 8*2 bdt
MBED_ALIGN(512) BDT bdt[NUMBER_OF_PHYSICAL_ENDPOINTS * 2]; // 512 bytes aligned!

uint8_t * endpoint_buffer[NUMBER_OF_PHYSICAL_ENDPOINTS * 2];
uint8_t *endpoint_buffer[NUMBER_OF_PHYSICAL_ENDPOINTS * 2];
uint8_t ep0_buffer[2][MAX_PACKET_SIZE_EP0];
uint8_t ep1_buffer[2][MAX_PACKET_SIZE_EP1];
uint8_t ep2_buffer[2][MAX_PACKET_SIZE_EP2];
Expand All @@ -96,8 +96,9 @@ static ctrl_xfer_t ctrl_xfer = CTRL_XFER_READY;

static uint32_t Data1 = 0x55555555;

static uint32_t frameNumber() {
return((USB0->FRMNUML | (USB0->FRMNUMH << 8)) & 0x07FF);
static uint32_t frameNumber()
{
return ((USB0->FRMNUML | (USB0->FRMNUMH << 8)) & 0x07FF);
}

USBPhy *get_usb_phy()
Expand Down Expand Up @@ -126,11 +127,11 @@ void USBPhyHw::init(USBPhyEvents *events)
NVIC_DisableIRQ(USB0_IRQn);

#if (defined(FSL_FEATURE_SOC_MPU_COUNT) && (FSL_FEATURE_SOC_MPU_COUNT > 0U))
MPU->CESR=0;
MPU->CESR = 0;
#endif

#if (defined(FSL_FEATURE_SOC_SYSMPU_COUNT) && (FSL_FEATURE_SOC_SYSMPU_COUNT > 0U))
SYSMPU->CESR=0;
SYSMPU->CESR = 0;
#endif

#if defined(TARGET_KL43Z) || defined(TARGET_K22F) || defined(TARGET_K64F)
Expand All @@ -150,9 +151,9 @@ void USBPhyHw::init(USBPhyEvents *events)

// USB Module Configuration
// Set BDT Base Register
USB0->BDTPAGE1 = (uint8_t)((uint32_t)bdt>>8);
USB0->BDTPAGE2 = (uint8_t)((uint32_t)bdt>>16);
USB0->BDTPAGE3 = (uint8_t)((uint32_t)bdt>>24);
USB0->BDTPAGE1 = (uint8_t)((uint32_t)bdt >> 8);
USB0->BDTPAGE2 = (uint8_t)((uint32_t)bdt >> 16);
USB0->BDTPAGE3 = (uint8_t)((uint32_t)bdt >> 24);

// Clear interrupt flag
USB0->ISTAT = 0xff;
Expand Down Expand Up @@ -209,7 +210,7 @@ void USBPhyHw::connect()
void USBPhyHw::disconnect()
{
// disable all endpoints to prevent them from nacking when disconnected
for(int i = 0; i < 16; i++) {
for (int i = 0; i < 16; i++) {
USB0->ENDPOINT[i].ENDPT = 0x00;
}
// disable USB
Expand Down Expand Up @@ -259,7 +260,7 @@ void USBPhyHw::remote_wakeup()
#define ALLOW_BULK_OR_INT_ENDPOINTS (USB_EP_ATTR_ALLOW_BULK | USB_EP_ATTR_ALLOW_INT)
#define ALLOW_NO_ENDPOINTS 0

const usb_ep_table_t* USBPhyHw::endpoint_table()
const usb_ep_table_t *USBPhyHw::endpoint_table()
{
static const usb_ep_table_t endpoint_table = {
1, // No cost per endpoint - everything allocated up front
Expand Down Expand Up @@ -349,7 +350,7 @@ void USBPhyHw::ep0_write(uint8_t *buffer, uint32_t size)
// Prepare for next setup packet
endpoint_read_core(EP0OUT, MAX_PACKET_SIZE_EP0);
ctrl_xfer = CTRL_XFER_READY;
}
}
endpoint_write(EP0IN, buffer, size);

// Clear suspend after the setup stage
Expand Down Expand Up @@ -386,7 +387,7 @@ void USBPhyHw::ep0_stall()
bool USBPhyHw::endpoint_add(usb_ep_t endpoint, uint32_t max_packet, usb_ep_type_t type)
{
uint32_t handshake_flag = 0;
uint8_t * buf;
uint8_t *buf;

if (DESC_TO_PHY(endpoint) > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) {
return false;
Expand All @@ -406,21 +407,21 @@ bool USBPhyHw::endpoint_add(usb_ep_t endpoint, uint32_t max_packet, usb_ep_type_

// IN endpt -> device to host (TX)
if (DESC_EP_IN(endpoint)) {
bdt[EP_BDT_IDX(log_endpoint, TX, ODD )].address = (uint32_t) buf;
bdt[EP_BDT_IDX(log_endpoint, TX, ODD )].info = 0;
bdt[EP_BDT_IDX(log_endpoint, TX, ODD)].address = (uint32_t) buf;
bdt[EP_BDT_IDX(log_endpoint, TX, ODD)].info = 0;
bdt[EP_BDT_IDX(log_endpoint, TX, EVEN)].address = 0;
USB0->ENDPOINT[log_endpoint].ENDPT |= handshake_flag | // ep handshaking (not if iso endpoint)
USB_ENDPT_EPTXEN_MASK; // en TX (IN) tran
}
// OUT endpt -> host to device (RX)
else {
bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].byte_count = max_packet;
bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].address = (uint32_t) buf;
bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].info = BD_DTS_MASK;
bdt[EP_BDT_IDX(log_endpoint, RX, ODD)].byte_count = max_packet;
bdt[EP_BDT_IDX(log_endpoint, RX, ODD)].address = (uint32_t) buf;
bdt[EP_BDT_IDX(log_endpoint, RX, ODD)].info = BD_DTS_MASK;
bdt[EP_BDT_IDX(log_endpoint, RX, EVEN)].info = 0;
if (log_endpoint == 0) {
// Prepare for setup packet
bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].info |= BD_OWN_MASK;
bdt[EP_BDT_IDX(log_endpoint, RX, ODD)].info |= BD_OWN_MASK;
}
USB0->ENDPOINT[log_endpoint].ENDPT |= handshake_flag | // ep handshaking (not if iso endpoint)
USB_ENDPT_EPRXEN_MASK; // en RX (OUT) tran.
Expand Down Expand Up @@ -466,8 +467,7 @@ bool USBPhyHw::endpoint_read_core(usb_ep_t endpoint, uint32_t max_packet)
bdt[idx].byte_count = max_packet;
if ((Data1 >> DESC_TO_PHY(endpoint)) & 1) {
bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK | BD_DATA01_MASK;
}
else {
} else {
bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK;
}

Expand All @@ -491,7 +491,7 @@ bool USBPhyHw::endpoint_read_result_core(usb_ep_t endpoint, uint8_t *data, uint3
{
uint32_t n, sz, idx, setup = 0;
uint8_t not_iso;
uint8_t * ep_buf;
uint8_t *ep_buf;

uint32_t log_endpoint = DESC_TO_LOG(endpoint);

Expand Down Expand Up @@ -542,7 +542,7 @@ bool USBPhyHw::endpoint_read_result_core(usb_ep_t endpoint, uint8_t *data, uint3
bool USBPhyHw::endpoint_write(usb_ep_t endpoint, uint8_t *data, uint32_t size)
{
uint32_t idx, n;
uint8_t * ep_buf;
uint8_t *ep_buf;

if (DESC_TO_PHY(endpoint) > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) {
return false;
Expand Down Expand Up @@ -588,7 +588,7 @@ void USBPhyHw::process()
// reset interrupt
if (istat & USB_ISTAT_USBRST_MASK) {
// disable all endpt
for(i = 0; i < 16; i++) {
for (i = 0; i < 16; i++) {
USB0->ENDPOINT[i].ENDPT = 0x00;
}

Expand Down Expand Up @@ -631,9 +631,10 @@ void USBPhyHw::process()
}

// stall interrupt
if (istat & 1<<7) {
if (USB0->ENDPOINT[0].ENDPT & USB_ENDPT_EPSTALL_MASK)
if (istat & 1 << 7) {
if (USB0->ENDPOINT[0].ENDPT & USB_ENDPT_EPSTALL_MASK) {
USB0->ENDPOINT[0].ENDPT &= ~USB_ENDPT_EPSTALL_MASK;
}
USB0->ISTAT = USB_ISTAT_STALL_MASK;
}

Expand All @@ -660,9 +661,9 @@ void USBPhyHw::process()
} else {
// OUT packet
if (rx_en && (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == OUT_TOKEN)) {
if (num == 0)
if (num == 0) {
events->ep0_out();
else {
} else {
epComplete |= EP(phy_ep);
events->out(PHY_TO_DESC(phy_ep));
}
Expand All @@ -676,8 +677,7 @@ void USBPhyHw::process()
USB0->ADDR = addr & 0x7F;
set_addr = 0;
}
}
else {
} else {
epComplete |= EP(phy_ep);
events->in(PHY_TO_DESC(phy_ep));
}
Expand All @@ -688,7 +688,7 @@ void USBPhyHw::process()
}

// sleep interrupt
if (istat & 1<<4) {
if (istat & 1 << 4) {
USB0->ISTAT = USB_ISTAT_SLEEP_MASK;
events->suspend(true);
}
Expand All @@ -713,7 +713,8 @@ void USBPhyHw::process()
NVIC_EnableIRQ(USB0_IRQn);
}

void USBPhyHw::_usbisr(void) {
void USBPhyHw::_usbisr(void)
{
NVIC_DisableIRQ(USB0_IRQn);
instance->events->start_process();
}
Expand Down
10 changes: 5 additions & 5 deletions usb/device/targets/TARGET_NXP/USBHAL_LPC17.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ static USBPhyHw *instance;
static uint32_t opStarted;

static const usb_ep_t ISO_EPS[] = {
0x03, 0x83,
0x06, 0x86,
0x09, 0x89,
0x0C, 0x8C
0x03, 0x83,
0x06, 0x86,
0x09, 0x89,
0x0C, 0x8C
};

static void SIECommand(uint32_t command)
Expand Down Expand Up @@ -171,7 +171,7 @@ static uint8_t SIEgetDeviceStatus(void)
return SIEReadData(SIE_CMD_GET_DEVICE_STATUS);
}

void SIEsetAddress(uint8_t address, bool enable=true)
void SIEsetAddress(uint8_t address, bool enable = true)
{
// Write SIE device address register
SIECommand(SIE_CMD_SET_ADDRESS);
Expand Down
20 changes: 10 additions & 10 deletions usb/device/targets/TARGET_RENESAS/TARGET_RZ_A1XX/USBPhyHw.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class USBPhyHw : public USBPhy {
virtual void sof_disable();
virtual void set_address(uint8_t address);
virtual void remote_wakeup();
virtual const usb_ep_table_t* endpoint_table();
virtual const usb_ep_table_t *endpoint_table();

virtual uint32_t ep0_set_max_packet(uint32_t max_packet);
virtual void ep0_setup_read_result(uint8_t *buffer, uint32_t size);
Expand All @@ -59,7 +59,7 @@ class USBPhyHw : public USBPhy {
virtual void process();

private:
#define PIPE_NUM (16)
#define PIPE_NUM (16)

typedef struct {
bool enable;
Expand All @@ -76,18 +76,18 @@ class USBPhyHw : public USBPhy {
static void _usbisr(void);
void chg_curpipe(uint16_t pipe, uint16_t isel);
uint16_t is_set_frdy(uint16_t pipe, uint16_t isel);
uint8_t * read_fifo(uint16_t pipe, uint16_t count, uint8_t *read_p);
uint8_t *read_fifo(uint16_t pipe, uint16_t count, uint8_t *read_p);
uint16_t read_data(uint16_t pipe);
void fifo_to_buf(uint16_t pipe);
uint8_t * write_fifo(uint16_t pipe, uint16_t count, uint8_t *write_p);
uint8_t *write_fifo(uint16_t pipe, uint16_t count, uint8_t *write_p);
uint16_t write_data(uint16_t pipe);
void buf_to_fifo(uint16_t pipe);
uint16_t * get_pipectr_reg(uint16_t pipe);
uint16_t * get_pipetre_reg(uint16_t pipe);
uint16_t * get_pipetrn_reg(uint16_t pipe);
uint16_t * get_fifoctr_reg(uint16_t pipe);
uint16_t * get_fifosel_reg(uint16_t pipe);
uint32_t * get_fifo_reg(uint16_t pipe);
uint16_t *get_pipectr_reg(uint16_t pipe);
uint16_t *get_pipetre_reg(uint16_t pipe);
uint16_t *get_pipetrn_reg(uint16_t pipe);
uint16_t *get_fifoctr_reg(uint16_t pipe);
uint16_t *get_fifosel_reg(uint16_t pipe);
uint32_t *get_fifo_reg(uint16_t pipe);
uint16_t get_pid(uint16_t pipe);
void set_mbw(uint16_t pipe, uint16_t data);
void set_pid(uint16_t pipe, uint16_t new_pid);
Expand Down
Loading