Commit fd55dc36 authored by Rahix's avatar Rahix

chore: Remove trailing whitespaces

It's 44 years since the release of vi and sadly lots of editors still
don't care about trimming off trailing spaces ...
Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent f0d94559
Pipeline #4575 passed with stages
in 1 minute and 15 seconds
......@@ -196,7 +196,7 @@ Accessing services from a linux system is possible via ``btgatt-client``. The in
.. code-block::
# pairing the card10:
$ bluetoothctl
[bluetooth]# power on
[bluetooth]# scan on
......@@ -213,7 +213,7 @@ Accessing services from a linux system is possible via ``btgatt-client``. The in
# if this error appears remove and re-pair:
[GATT client]# Device disconnected: Software caused connection abort
ARM Cordio Sources
------------------
......
......@@ -56,7 +56,7 @@ the following commands:
.. warning::
Make sure ``CMSIS-DAP Compliant Debugger`` is set to **yes (auto)** after
running ``./configure`` (if it is not, you might need to install ``libhidapi-dev``
(Ubuntu)). If you get errors making the documentation you can
(Ubuntu)). If you get errors making the documentation you can
``touch doc/openocd.info`` to skip it and continue with ``make``.
.. code-block:: shell-session
......@@ -118,7 +118,7 @@ command to soft-reset card10.
.. note::
You will also find the following self-describing gdb files in the firmware
root directory, which do not require additional arguments:
``flash-all.gdb, flash-bootloader.gdb,
``flash-all.gdb, flash-bootloader.gdb,
flash-both.gdb, flash-epicardium.gdb, flash-pycardium.gdb``
.. warning::
......
......@@ -29,7 +29,7 @@ Dependencies
dnf install arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib
- macOS (Note: The card10 firmware team used Linux so far. macOS recommendations here are experimental.)
- macOS (Note: The card10 firmware team used Linux so far. macOS recommendations here are experimental.)
You can use `Homebrew`_ to install the required tools. The version of the
ARM crosscompiler tool chain is quite important; with the wrong version,
......@@ -176,12 +176,12 @@ Otherwise, rerunning ``./bootstrap.sh`` will also clean the build-directory.
.. note::
If you try to flash pycardium_epicardium.bin (renamed to card10.bin)
If you try to flash pycardium_epicardium.bin (renamed to card10.bin)
and the bootloader does not finish updating, the file might be too large.
~700kB is the normal size, but problems were reported where the file size
was >1MB. This was caused by the ``tr`` tool in the build process
(it's supposed to create a large file with 0xff in it) - this requires the
LC_ALL environment variable to be not set, or set to "C"
~700kB is the normal size, but problems were reported where the file size
was >1MB. This was caused by the ``tr`` tool in the build process
(it's supposed to create a large file with 0xff in it) - this requires the
LC_ALL environment variable to be not set, or set to "C"
(but not UTF8 or similar).
Docker
......
......@@ -40,7 +40,7 @@ appUiCback_t appUiCbackTbl;
/*************************************************************************************************/
/*!
* \brief card10 - Should disable encryption. MAXIM bug reported to us in current static library. Requires
* \brief card10 - Should disable encryption. MAXIM bug reported to us in current static library. Requires
* this to be called before the BTLE app starts making advertisements. Avoids encryption
* rendering the frame unreadable.
*
......
......@@ -339,7 +339,7 @@ static void bleSetup(bleMsg_t *pMsg)
bleScanDataDisc[14] = f;
}
}
/* set advertising and scan response data for discoverable mode */
AppAdvSetData(APP_ADV_DATA_DISCOVERABLE, sizeof(bleAdvDataDisc), (uint8_t *) bleAdvDataDisc);
AppAdvSetData(APP_SCAN_DATA_DISCOVERABLE, sizeof(bleScanDataDisc), (uint8_t *) bleScanDataDisc);
......
......@@ -235,7 +235,7 @@ static const uint8_t UUID_attChar_personal_state[] = {
CARD10_UUID_SUFFIX, 0x19, CARD10_UUID_PREFIX
};
static uint8_t personalStateValue = 0;
static uint8_t personalStateValue = 0;
static uint16_t personalStateLen = sizeof(personalStateValue);
/* BLE UUID for card10 above leds */
......@@ -280,7 +280,7 @@ static uint16_t initLightSensorLen = sizeof(initLightSensorValue);
/* clang-format on */
/*
* Create the BLE service description.
* Create the BLE service description.
*/
static const attsAttr_t card10SvcAttrList[] = {
......
/*
* BLE (Bluetooth Low energy) file transfer service.
*
* This file provides a BLE service and a characteristic which allows to
* write the content of the mytest.py file over BLE into the file system.
* We haven't found any existing BLE service which provides such a
* This file provides a BLE service and a characteristic which allows to
* write the content of the mytest.py file over BLE into the file system.
* We haven't found any existing BLE service which provides such a
* functionality so we implemented our own service.
* The service uses the UUID in fileTransSvc
......@@ -11,11 +11,11 @@
* BLE point to point links use a pretty small MTU (min 23 bytes, max 244
* bytes) which is negotiated between the central and the peripheral (card10).
*
*
* The first byte of each message is the type of message being send,
* different types are supported and based on this type the next bytes
* have different meaning.
*
*
* TODOs:
* * File deletion
* * File read
......@@ -180,7 +180,7 @@ static const attsAttr_t fileTransCfgList[] = {
/**
* Send a repose with an optional CRC.
*
*
* The Central RX characteristic is filled and a notification is send in addition.
* If msg is given message is added in addition.
*/
......@@ -222,7 +222,7 @@ static void sendCrcResponse(
}
/*
* This function splits the path into the folders and the file name and
* This function splits the path into the folders and the file name and
* creates all the missing folders.
*/
static int bleFileCreateOrOpen(char *filepath)
......@@ -377,7 +377,7 @@ static uint8_t handleCentralTX(
/*
* BLE file transfer write callback.
*
*
* This gets called when data is written by a BLE central to our BLE
* peripheral. Here we take care of handling the received data.
*/
......
......@@ -137,7 +137,7 @@ void StackInit(void)
#endif /* DATS_APP_USE_LEGACY_API */
if(memUsed != LL_MEMORY_FOOTPRINT)
{
printf("Controller memory mismatch 0x%x != 0x%x\n", (unsigned int)memUsed,
printf("Controller memory mismatch 0x%x != 0x%x\n", (unsigned int)memUsed,
(unsigned int)LL_MEMORY_FOOTPRINT);
}
#endif
......
......@@ -914,9 +914,9 @@ struct max86150_sensor_data {
/**
* Enable a MAX86150 PPG and ECG sensor.
*
* Calling this function will instruct the MAX86150 to collect a
* data from the sensor. You can then retrieve the samples using
*
* Calling this function will instruct the MAX86150 to collect a
* data from the sensor. You can then retrieve the samples using
* :c:func:`epic_stream_read`.
*
* :param max86150_sensor_config* config: Configuration for this sensor.
......
......@@ -33,7 +33,7 @@ int efs_rename(EpicFileSystem *fs, const char *oldp, const char *newp);
int efs_mkdir(EpicFileSystem *fs, const char *dirname);
/**
* lock global filesystem
*
*
* locks the global mutex and, if the global EpicFileSystem has been initialized correctly
* passes it to *fs
*
......
......@@ -16,7 +16,7 @@ void fatfs_init(void);
/**
* initialize and mount the FLASH storage
*
*
* NOTE: not safe to be called from an ISR
*/
int fatfs_attach(void);
......@@ -24,7 +24,7 @@ int fatfs_attach(void);
/**
* asynchronously attach the FLASH storage
*
*
* safe to be called from an ISR
*/
void fatfs_schedule_attach(void);
......@@ -32,7 +32,7 @@ void fatfs_schedule_attach(void);
/** close all opened FDs, sync and deinitialize FLASH layer */
void fatfs_detach(void);
/** close all onpened FDs
/** close all onpened FDs
* TODO: add ability to close FDs opened by core0/core1 only
*/
#define EPICARDIUM_COREMASK_0 0x01
......
/**
*
*
* Implementation of public epic_usb_ interface
*
*
* Configuration and FLASH-specific implementation of USB mass storage device
* Configuration of USB CDCACM device
*
*
* USB descriptors for both are defined here.
*
*
*/
#include "epicardium.h"
......
/**
*
*
* epicardium-specific implemnetation of cdcacm device
* services CDCACM API
*/
......
/**
*
*
*
*
* Core of the USB implementation:
*
*
* - device independent
* - handles setup of MAXUSB stack
* - handles events and state of the MAXUSB stack
*
*
* Also contains definitions of device-independent String descriptors
*
*
*
*
*
*
*
*
*
*
* swym's USB ramblings:
*
*
* setting up USB basically consists of two parts:
*
*
* - set up descriptors
* - initialize the corresponding MAXUSB stacks - acm, msc...
*
*
* at the moment, the descriptors are statically configured in
* descriptors.h several descriptors point to enumeration descriptors
* via iFooBar indices. Those enumeration descriptors are registered
* via enum_register_descriptor(type, desc, idx), where the idx passed
* corresponds to the iFooBar index mentioned above.
*
*
* There are several callbacks, some of which do not perform anything meaningful
* at the moment. For example usb_write_callback sets a global flag that is never
* read from. These will be removed later on.
*
*
* The initialization routines of acm & msc refer to the descriptors from which,
* among other things, they get their enpoint IDs. These are hard-coded right now
* but it would make sense to allocate these IDs at runtime. There is, AFAICT, no
* reason for these endpoint IDs to be 3, 1, 2 in the CDCACM case for example.
*
*
* Allocating those at runtime would also make the setup less rigid: we can have all
* combinations of {cdcacm, storage} interfaces without the awkward descriptor hackery
* in epc_usb_init.
*
*
* To generalize even further, the descriptors could be malloced. The total length of
* the descriptor structure can easily be derived from the number of interfaces to be
* initialized. The memory allocated will then be split up (with alignment of the single
* descriptor structs taken care of) in a simple bump-allocator strategy on demand.
*
*
*
*
*/
#include "usb/epc_usb.h"
......
......@@ -2,7 +2,7 @@
#define EPICARDIUM_USB_EPC_USB_H_INCLUDED
/**
*
*
* EPC - it's not just a Universal Serial Bus,
* it's an Epic Serial Bus!
*/
......
......@@ -13,7 +13,7 @@ BRIGHTNESS = 1.0
class BMPError(Exception):
pass
class POV:
class POV:
def __init__(self, filename=FILENAME):
self.filename = filename
f = open("/" + self.filename, "rb")
......@@ -60,7 +60,7 @@ class POV:
return self.fileOffset
def read_le(self, bytes):
return int.from_bytes(bytes, 'little')
def read_image(self):
def read_image(self):
self.imageArray = []
flip = True
rowSize = (self.bmpWidth * 3 + 3) & ~3
......@@ -81,7 +81,7 @@ class POV:
def getImageArray(self):
return self.imageArray
def playMe(self):
for i in self.imageArray:
leds.set_all(i)
......
......@@ -103,14 +103,14 @@ def expand(colors, cutoff=12):
def show_leds(flag="rainbow", brightness=0.5, gamma=1, cutoff=12, halo=True):
"""
Shows pride flag on the top leds.
:param str flag: Chooses flag. A list of all available flags is accessible
via print_all(). Default = 'rainbow'
:param float brightness: Set brightness of LEDs. Default = 0.5
:param float gamma: Apply simple gamma correction to adjust colors.
:param float gamma: Apply simple gamma correction to adjust colors.
Default = 1
:param int cutoff: See expand(). Default = 12
:param bool halo: Bottom LEDs copy outermost top LEDs if true.
:param bool halo: Bottom LEDs copy outermost top LEDs if true.
Default = True
"""
colors = ledfx.col_cor(flags[flag], brightness, gamma)
......@@ -124,7 +124,7 @@ def show_leds(flag="rainbow", brightness=0.5, gamma=1, cutoff=12, halo=True):
def show_display(flag="rainbow", brightness=1, gamma=1):
"""
Shows pride flag on the display.
:param str flag: Chooses flag. A list of all available flags is accessible
via print_all(). Default = 'rainbow'
:param float brightness: Set brightness of LEDs. Default = 0.5
......@@ -162,7 +162,7 @@ def print_all():
def demo(s_delay=2):
"""
Demos all available flags on LEDs and display.
:param int s_delay: How long each flag is shown in seconds. Default = 2
"""
for i in flags:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment