mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-28 14:24:34 +00:00
Whitespace cleanup
This commit is contained in:
parent
584a8cd1a8
commit
5a35595a3a
@ -86,7 +86,7 @@ int RingBuffer::read() {
|
||||
ring_buffer_pos_t RingBuffer::read(uint8_t *buffer) {
|
||||
ring_buffer_pos_t len = available();
|
||||
|
||||
for(ring_buffer_pos_t i = 0; read_index != write_index; i++) {
|
||||
for (ring_buffer_pos_t i = 0; read_index != write_index; i++) {
|
||||
buffer[i] = data[read_index];
|
||||
read_index = NEXT_INDEX(read_index, size);
|
||||
}
|
||||
@ -139,9 +139,8 @@ size_t WebSocketSerial::write(const uint8_t c) {
|
||||
|
||||
size_t WebSocketSerial::write(const uint8_t* buffer, size_t size) {
|
||||
size_t written = 0;
|
||||
for(size_t i = 0; i < size; i++) {
|
||||
for (size_t i = 0; i < size; i++)
|
||||
written += write(buffer[i]);
|
||||
}
|
||||
return written;
|
||||
}
|
||||
|
||||
|
@ -155,9 +155,9 @@ uint16_t XPT2046::getRawData(const XPTCoordinate coordinate) {
|
||||
|
||||
uint16_t XPT2046::HardwareIO(uint16_t data) {
|
||||
__HAL_SPI_ENABLE(&SPIx);
|
||||
while((SPIx.Instance->SR & SPI_FLAG_TXE) != SPI_FLAG_TXE) {}
|
||||
while ((SPIx.Instance->SR & SPI_FLAG_TXE) != SPI_FLAG_TXE) {}
|
||||
SPIx.Instance->DR = data;
|
||||
while((SPIx.Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE) {}
|
||||
while ((SPIx.Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE) {}
|
||||
__HAL_SPI_DISABLE(&SPIx);
|
||||
|
||||
return SPIx.Instance->DR;
|
||||
|
@ -441,9 +441,9 @@ public:
|
||||
}
|
||||
|
||||
void dispatch() {
|
||||
switch(static_cast<Protocol>(packet.header.protocol())) {
|
||||
switch (static_cast<Protocol>(packet.header.protocol())) {
|
||||
case Protocol::CONTROL:
|
||||
switch(static_cast<ProtocolControl>(packet.header.type())) {
|
||||
switch (static_cast<ProtocolControl>(packet.header.type())) {
|
||||
case ProtocolControl::CLOSE: // revert back to ASCII mode
|
||||
card.flag.binary_mode = false;
|
||||
break;
|
||||
|
@ -74,7 +74,7 @@ void GcodeSuite::M994() {
|
||||
W25QXX.init(SPI_QUARTER_SPEED);
|
||||
W25QXX.SPI_FLASH_BulkErase();
|
||||
SERIAL_ECHOPGM("Load SPI Flash");
|
||||
while(addr < SPI_FLASH_SIZE) {
|
||||
while (addr < SPI_FLASH_SIZE) {
|
||||
card.read(buf, COUNT(buf));
|
||||
W25QXX.SPI_FLASH_BufferWrite(buf, addr, COUNT(buf));
|
||||
addr += COUNT(buf);
|
||||
|
@ -194,7 +194,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void) {
|
||||
unsigned char temp_Counter;
|
||||
for (temp_Counter = 0; temp_Counter < LED_NUM; temp_Counter++) {
|
||||
LED_DataArray[temp_Counter] = 0;
|
||||
switch(RGB_Scale) {
|
||||
switch (RGB_Scale) {
|
||||
case RGB_SCALE_R10_G7_B5: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*7/10) << 16 | luminance*5/10; break;
|
||||
case RGB_SCALE_R10_G7_B4: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*7/10) << 16 | luminance*4/10; break;
|
||||
case RGB_SCALE_R10_G8_B7: LED_DataArray[temp_Counter] = (luminance*10/10) << 8 | (luminance*8/10) << 16 | luminance*7/10; break;
|
||||
@ -213,7 +213,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze(void) {
|
||||
bool LED_R_Flag = 0, LED_G_Flag = 0, LED_B_Flag = 0;
|
||||
|
||||
for (temp_Counter = 0; temp_Counter < LED_NUM; temp_Counter++) {
|
||||
switch(RGB_Scale) {
|
||||
switch (RGB_Scale) {
|
||||
case RGB_SCALE_R10_G7_B5: {
|
||||
LED_R_Data[temp_Counter] = luminance*10/10;
|
||||
LED_G_Data[temp_Counter] = luminance*7/10;
|
||||
|
@ -603,7 +603,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
|
||||
touch.clear();
|
||||
|
||||
if (calibration_stage < CALIBRATION_SUCCESS) {
|
||||
switch(calibration_stage) {
|
||||
switch (calibration_stage) {
|
||||
case CALIBRATION_POINT_1: tft_string.set("Top Left"); break;
|
||||
case CALIBRATION_POINT_2: y = TFT_HEIGHT - 21; tft_string.set("Bottom Left"); break;
|
||||
case CALIBRATION_POINT_3: x = TFT_WIDTH - 21; tft_string.set("Top Right"); break;
|
||||
|
@ -608,7 +608,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
|
||||
touch.clear();
|
||||
|
||||
if (calibration_stage < CALIBRATION_SUCCESS) {
|
||||
switch(calibration_stage) {
|
||||
switch (calibration_stage) {
|
||||
case CALIBRATION_POINT_1: tft_string.set("Top Left"); break;
|
||||
case CALIBRATION_POINT_2: y = TFT_HEIGHT - 21; tft_string.set("Bottom Left"); break;
|
||||
case CALIBRATION_POINT_3: x = TFT_WIDTH - 21; tft_string.set("Top Right"); break;
|
||||
|
Loading…
Reference in New Issue
Block a user