Skip to content

Commit 28709f8

Browse files
committed
Rename to comply with Arduino library rules
1 parent ead2b6f commit 28709f8

File tree

11 files changed

+21
-21
lines changed

11 files changed

+21
-21
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ See the Wiki for how to wire the board and the additional components.
3939
The protocol analyzer can be connected between two USB PD devices to monitor the USB PD communication.
4040

4141
```c++
42-
#include "PowerDelivery.h"
42+
#include "USBPowerDelivery.h"
4343

4444
void setup() {
4545
Serial.begin(115200);
4646
PowerController.startMonitor();
4747
}
4848

4949
void loop() {
50-
ProtocolAnalyzer::poll();
50+
USBPDProtocolAnalyzer::poll();
5151
}
5252
```
5353

@@ -60,7 +60,7 @@ See the Wiki for details regarding the required components and wiring.
6060
The trigger boards communicates with a USB power supply and requests a different voltage than the initial 5V.
6161

6262
```c++
63-
#include "PowerDelivery.h"
63+
#include "USBPowerDelivery.h"
6464

6565
void setup() {
6666
PowerSink.start();

examples/ProtocolAnalyzer/ProtocolAnalyzer.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "PowerDelivery.h"
1+
#include "USBPowerDelivery.h"
22

33
void setup() {
44
Serial.begin(115200);

examples/TriggerBoard/TriggerBoard.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "PowerDelivery.h"
1+
#include "USBPowerDelivery.h"
22

33
void setup() {
44
PowerSink.start();

library.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/schema/library.json",
3-
"name": "USB-Power-Delivery",
3+
"name": "USBPowerDelivery",
44
"version": "1.0.0",
5-
"description": "USB Power Delivery for Arduino projects. Create a USB PD protocol analyzer, trigger board or power sink for no or only few additional components. Supports several STM32 boards.",
5+
"description": "USB Power Delivery for Arduino. Create a USB PD protocol analyzer, trigger board or power sink for no or only few additional components. Supports several STM32 boards.",
66
"keywords": "usb,usb-pd,usb-power-delivery,protocol-analyzer,trigger-board",
77
"homepage": "https://github.com/manuelbl/usb-pd-arduino",
88
"repository": {
@@ -18,7 +18,7 @@
1818
"license": "MIT",
1919
"frameworks": ["arduino"],
2020
"platforms": ["ststm32"],
21-
"headers": ["PowerDelivery.h", "PDController.h", "PDSink.h", "ProtocolAnalyzer.h"],
21+
"headers": ["USBPowerDelivery.h", "PDController.h", "PDSink.h", "USBPDProtocolAnalyzer.h"],
2222
"examples": [
2323
{
2424
"name": "Protocol Analyzer",

library.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name=USB Power Delivery
2-
version=1.0.0
1+
name=USBPowerDelivery
2+
version=1.0.1
33
author=Manuel Bl. <manuel.bleichenbacher@gmail.com>
44
maintainer=Manuel Bl. <manuel.bleichenbacher@gmail.com>
5-
sentence=USB Power Delivery for Arduino projects.
5+
sentence=USB Power Delivery for Arduino.
66
paragraph=Build a USB PD protocol analyzer, a trigger board or a more sophisticated power sink with no or only a few additional components. Supports several STM32 boards.
77
category=Device Control
88
url=https://github.com/manuelbl/usb-pd-arduino
99
dot_a_linkage=true
10-
includes=PowerDelivery.h
10+
includes=USBPowerDelivery.h
1111
architectures=stm32

src/ProtoclAnalyzer.cpp renamed to src/USBPDProtocolAnalyzer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
#include <Arduino.h>
10-
#include "ProtocolAnalyzer.h"
10+
#include "USBPDProtocolAnalyzer.h"
1111
#include "PDSourceCapability.h"
1212
#include "PDController.h"
1313

@@ -126,7 +126,7 @@ static void printMessage(const PDMessage* message) {
126126
Serial.printf(" %08x", message->objects[i]);
127127
}
128128

129-
void ProtocolAnalyzer::poll() {
129+
void USBPDProtocolAnalyzer::poll() {
130130
auto logEntry = PowerController.popLogEntry();
131131
if (logEntry == nullptr)
132132
return;

src/ProtocolAnalyzer.h renamed to src/USBPDProtocolAnalyzer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
#pragma once
1010

11-
struct ProtocolAnalyzer {
11+
struct USBPDProtocolAnalyzer {
1212
static void poll();
1313
};

src/PowerDelivery.h renamed to src/USBPowerDelivery.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
#include "PDController.h"
1616
#include "PDSink.h"
17-
#include "ProtocolAnalyzer.h"
17+
#include "USBPDProtocolAnalyzer.h"

test/ListCapabilities/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212

1313
#include <Arduino.h>
14-
#include "PowerDelivery.h"
14+
#include "USBPowerDelivery.h"
1515

1616
static void handleEvent(PDSinkEventType eventType);
1717
static void listCapabilities();

test/ProtocolAnalyzer/src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
//
1212

1313
#include <Arduino.h>
14-
#include "PowerDelivery.h"
14+
#include "USBPowerDelivery.h"
1515

1616
void setup() {
1717
Serial.begin(115200);
1818
PowerController.startMonitor();
1919
}
2020

2121
void loop() {
22-
ProtocolAnalyzer::poll();
22+
USBPDProtocolAnalyzer::poll();
2323
}

0 commit comments

Comments
 (0)