Browse Source

Move library code to library directory

/!\ BROKEN BUILD /!\

This commit moves the library code to the library directory.  This
causes the firmware to not compile.  A few changes were made to reduce
the nubmer of errors, but some errors just aren't going to go away until
I go ahead with the planned changes.
Clara Hobbs 6 years ago
parent
commit
2606142c26

src/pd.h → lib/inc/pd.h View File


src/fusb302b.c → lib/src/fusb302b.c View File


src/fusb302b.h → lib/src/fusb302b.h View File


src/hard_reset.c → lib/src/hard_reset.c View File


src/hard_reset.h → lib/src/hard_reset.h View File


src/int_n.c → lib/src/int_n.c View File


src/int_n.h → lib/src/int_n.h View File


src/messages.c → lib/src/messages.c View File


src/messages.h → lib/src/messages.h View File


src/policy_engine.c → lib/src/policy_engine.c View File


src/policy_engine.h → lib/src/policy_engine.h View File


+ 31
- 0
lib/src/priorities.h View File

@@ -0,0 +1,31 @@
1
+/*
2
+ * PD Buddy - USB Power Delivery for everyone
3
+ * Copyright (C) 2017 Clayton G. Hobbs <clay@lakeserv.net>
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+ * GNU General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU General Public License
16
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+
19
+#ifndef PDB_PRIORITIES_H
20
+#define PDB_PRIORITIES_H
21
+
22
+
23
+#include <ch.h>
24
+
25
+/* PD Buddy thread priorities */
26
+#define PDB_PRIO_PE (NORMALPRIO - 1)
27
+#define PDB_PRIO_PRL (PDB_PRIO_PE - 1)
28
+#define PDB_PRIO_PRL_INT_N (PDB_PRIO_PRL - 1)
29
+
30
+
31
+#endif /* PDB_PRIORITIES_H */

src/protocol_rx.c → lib/src/protocol_rx.c View File


src/protocol_rx.h → lib/src/protocol_rx.h View File


src/protocol_tx.c → lib/src/protocol_tx.c View File


src/protocol_tx.h → lib/src/protocol_tx.h View File


+ 1
- 1
src/led.c View File

@@ -124,6 +124,6 @@ static THD_FUNCTION(LED, arg) {
124 124
 
125 125
 void pdb_led_run(void)
126 126
 {
127
-    pdb_led_thread = chThdCreateStatic(waLED, sizeof(waLED), PDB_PRIO_LED, LED,
127
+    pdb_led_thread = chThdCreateStatic(waLED, sizeof(waLED), PDBS_PRIO_LED, LED,
128 128
             NULL);
129 129
 }

+ 0
- 1
src/main.c View File

@@ -40,7 +40,6 @@
40 40
 #include "shell.h"
41 41
 #include "usbcfg.h"
42 42
 
43
-#include "priorities.h"
44 43
 #include "led.h"
45 44
 #include "device_policy_manager.h"
46 45
 #include "policy_engine.h"

+ 5
- 9
src/priorities.h View File

@@ -16,18 +16,14 @@
16 16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19
-#ifndef PDB_PRIORITIES_H
20
-#define PDB_PRIORITIES_H
19
+#ifndef PDBS_PRIORITIES_H
20
+#define PDBS_PRIORITIES_H
21 21
 
22 22
 
23 23
 #include <ch.h>
24 24
 
25
-/* PD Buddy thread priorities */
26
-#define PDB_PRIO_PE (NORMALPRIO - 1)
27
-#define PDB_PRIO_PRL (PDB_PRIO_PE - 1)
28
-#define PDB_PRIO_PRL_INT_N (PDB_PRIO_PRL - 1)
25
+/* PD Buddy Sink thread priorities */
26
+#define PDBS_PRIO_LED HIGHPRIO
29 27
 
30
-#define PDB_PRIO_LED HIGHPRIO
31 28
 
32
-
33
-#endif /* PDB_PRIORITIES_H */
29
+#endif /* PDBS_PRIORITIES_H */

Loading…
Cancel
Save