Format header files

In my PR updating clang-format, I forgot to also format the headers.
This commit is contained in:
Finlay Davidson
2023-01-07 21:23:15 +01:00
committed by JF
parent 09db67e003
commit 96165a8541
55 changed files with 144 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class NotificationManager;

View File

@@ -9,8 +9,10 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class Battery;
class BatteryInformationService {
public:
BatteryInformationService(Controllers::Battery& batteryController);

View File

@@ -24,6 +24,7 @@ namespace Pinetime {
void StopFirmwareUpdate();
void FirmwareUpdateTotalBytes(uint32_t totalBytes);
void FirmwareUpdateCurrentBytes(uint32_t currentBytes);
void State(FirmwareUpdateStates state) {
firmwareUpdateState = state;
}
@@ -31,12 +32,15 @@ namespace Pinetime {
bool IsFirmwareUpdating() const {
return isFirmwareUpdating;
}
uint32_t FirmwareUpdateTotalBytes() const {
return firmwareUpdateTotalBytes;
}
uint32_t FirmwareUpdateCurrentBytes() const {
return firmwareUpdateCurrentBytes;
}
FirmwareUpdateStates State() const {
return firmwareUpdateState;
}
@@ -44,15 +48,19 @@ namespace Pinetime {
void Address(BleAddress&& addr) {
address = addr;
}
const BleAddress& Address() const {
return address;
}
void AddressType(AddressTypes t) {
addressType = t;
}
void SetPairingKey(uint32_t k) {
pairingKey = k;
}
uint32_t GetPairingKey() const {
return pairingKey;
}

View File

@@ -19,12 +19,15 @@ namespace Pinetime {
bool OnDiscoveryEvent(uint16_t connectionHandle, const ble_gatt_error* error, const ble_gatt_svc* service);
int OnCharacteristicDiscoveryEvent(uint16_t conn_handle, const ble_gatt_error* error, const ble_gatt_chr* characteristic);
int OnCurrentTimeReadResult(uint16_t conn_handle, const ble_gatt_error* error, const ble_gatt_attr* attribute);
static constexpr const ble_uuid16_t* Uuid() {
return &CurrentTimeClient::ctsServiceUuid;
}
static constexpr const ble_uuid16_t* CurrentTimeCharacteristicUuid() {
return &CurrentTimeClient::currentTimeCharacteristicUuid;
}
void Discover(uint16_t connectionHandle, std::function<void(uint16_t)> lambda) override;
private:

View File

@@ -13,9 +13,11 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Drivers {
class SpiNorFlash;
}
namespace Controllers {
class Ble;
@@ -46,10 +48,12 @@ namespace Pinetime {
void OnNotificationTimer();
void Reset();
};
class DfuImage {
public:
DfuImage(Pinetime::Drivers::SpiNorFlash& spiNorFlash) : spiNorFlash {spiNorFlash} {
}
void Init(size_t chunkSize, size_t totalSize, uint16_t expectedCrc);
void Erase();
void Append(uint8_t* data, size_t size);

View File

@@ -11,8 +11,10 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class Ble;
class FSService {
public:
FSService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::FS& fs);
@@ -71,6 +73,7 @@ namespace Pinetime {
FSState state;
char filepath[maxpathlen]; // TODO ..ugh fixed filepath len
int fileSize;
using ReadHeader = struct __attribute__((packed)) {
commands command;
uint8_t padding;
@@ -89,6 +92,7 @@ namespace Pinetime {
uint32_t chunklen;
uint8_t chunk[];
};
using ReadPacing = struct __attribute__((packed)) {
commands command;
uint8_t status;
@@ -124,6 +128,7 @@ namespace Pinetime {
uint32_t dataSize;
uint8_t data[];
};
using ListDirHeader = struct __attribute__((packed)) {
commands command;
uint8_t padding;
@@ -171,6 +176,7 @@ namespace Pinetime {
commands command;
uint8_t status;
};
using MoveHeader = struct __attribute__((packed)) {
commands command;
uint8_t padding;

View File

@@ -10,8 +10,10 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class HeartRateController;
class HeartRateService {
public:
HeartRateService(Pinetime::System::SystemTask& system, Controllers::HeartRateController& heartRateController);

View File

@@ -9,8 +9,10 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class NotificationManager;
class ImmediateAlertService {
public:
enum class Levels : uint8_t { NoAlert = 0, MildAlert = 1, HighAlert = 2 };

View File

@@ -10,8 +10,10 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class MotionController;
class MotionService {
public:
MotionService(Pinetime::System::SystemTask& system, Controllers::MotionController& motionController);

View File

@@ -30,6 +30,7 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class MusicService {
public:

View File

@@ -30,6 +30,7 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class NavigationService {

View File

@@ -58,12 +58,15 @@ namespace Pinetime {
Pinetime::Controllers::MusicService& music() {
return musicService;
};
Pinetime::Controllers::NavigationService& navigation() {
return navService;
};
Pinetime::Controllers::AlertNotificationService& alertService() {
return anService;
};
Pinetime::Controllers::WeatherService& weather() {
return weatherService;
};

View File

@@ -51,9 +51,11 @@ namespace Pinetime {
static constexpr size_t MaximumMessageSize() {
return MessageSize;
};
bool IsEmpty() const {
return size == 0;
}
size_t NbNotifications() const;
private:

View File

@@ -39,6 +39,7 @@ namespace Pinetime {
namespace System {
class SystemTask;
}
namespace Controllers {
class WeatherService {