Browse Source

PDB -> PDBS

The PD Buddy Sink code should define PDBS macros, not PDB macros.
Clara Hobbs 6 years ago
parent
commit
805613a71d
6 changed files with 20 additions and 20 deletions
  1. 3
    3
      src/config.h
  2. 3
    3
      src/device_policy_manager.h
  3. 3
    3
      src/shell.c
  4. 5
    5
      src/shell.h
  5. 3
    3
      src/stm32f072_bootloader.h
  6. 3
    3
      src/usbcfg.h

+ 3
- 3
src/config.h View File

16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
  */
17
  */
18
 
18
 
19
-#ifndef PDB_CONFIG_H
20
-#define PDB_CONFIG_H
19
+#ifndef PDBS_CONFIG_H
20
+#define PDBS_CONFIG_H
21
 
21
 
22
 #include <stdint.h>
22
 #include <stdint.h>
23
 
23
 
111
 struct pdbs_config *pdbs_config_flash_read(void);
111
 struct pdbs_config *pdbs_config_flash_read(void);
112
 
112
 
113
 
113
 
114
-#endif /* PDB_CONFIG_H */
114
+#endif /* PDBS_CONFIG_H */

+ 3
- 3
src/device_policy_manager.h View File

16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
  */
17
  */
18
 
18
 
19
-#ifndef PDB_DEVICE_POLICY_MANAGER_H
20
-#define PDB_DEVICE_POLICY_MANAGER_H
19
+#ifndef PDBS_DEVICE_POLICY_MANAGER_H
20
+#define PDBS_DEVICE_POLICY_MANAGER_H
21
 
21
 
22
 #include <stdbool.h>
22
 #include <stdbool.h>
23
 
23
 
101
 void pdbs_dpm_transition_requested(struct pdb_config *cfg);
101
 void pdbs_dpm_transition_requested(struct pdb_config *cfg);
102
 
102
 
103
 
103
 
104
-#endif /* PDB_DEVICE_POLICY_MANAGER_H */
104
+#endif /* PDBS_DEVICE_POLICY_MANAGER_H */

+ 3
- 3
src/shell.c View File

585
     int n;
585
     int n;
586
     BaseSequentialStream *chp = shell_cfg.io;
586
     BaseSequentialStream *chp = shell_cfg.io;
587
     const struct pdbs_shell_cmd *scp = shell_cfg.commands;
587
     const struct pdbs_shell_cmd *scp = shell_cfg.commands;
588
-    char *lp, *cmd, *tokp, line[PDB_SHELL_MAX_LINE_LENGTH];
589
-    char *args[PDB_SHELL_MAX_ARGUMENTS + 1];
588
+    char *lp, *cmd, *tokp, line[PDBS_SHELL_MAX_LINE_LENGTH];
589
+    char *args[PDBS_SHELL_MAX_ARGUMENTS + 1];
590
 
590
 
591
     pdb_config = cfg;
591
     pdb_config = cfg;
592
     pdbs_dpm_data = cfg->dpm_data;
592
     pdbs_dpm_data = cfg->dpm_data;
608
         n = 0;
608
         n = 0;
609
         while ((lp = _strtok(NULL, " \t", &tokp)) != NULL) {
609
         while ((lp = _strtok(NULL, " \t", &tokp)) != NULL) {
610
             /* If we have too many tokens, abort */
610
             /* If we have too many tokens, abort */
611
-            if (n >= PDB_SHELL_MAX_ARGUMENTS) {
611
+            if (n >= PDBS_SHELL_MAX_ARGUMENTS) {
612
                 chprintf(chp, "too many arguments\r\n");
612
                 chprintf(chp, "too many arguments\r\n");
613
                 cmd = NULL;
613
                 cmd = NULL;
614
                 break;
614
                 break;

+ 5
- 5
src/shell.h View File

32
     limitations under the License.
32
     limitations under the License.
33
 */
33
 */
34
 
34
 
35
-#ifndef PDB_SHELL_H
36
-#define PDB_SHELL_H
35
+#ifndef PDBS_SHELL_H
36
+#define PDBS_SHELL_H
37
 
37
 
38
 #include <ch.h>
38
 #include <ch.h>
39
 
39
 
40
 #include <pdb.h>
40
 #include <pdb.h>
41
 
41
 
42
-#define PDB_SHELL_MAX_LINE_LENGTH 64
43
-#define PDB_SHELL_MAX_ARGUMENTS 2
42
+#define PDBS_SHELL_MAX_LINE_LENGTH 64
43
+#define PDBS_SHELL_MAX_ARGUMENTS 2
44
 
44
 
45
 
45
 
46
 /* Structure for PD Buddy shell commands */
46
 /* Structure for PD Buddy shell commands */
62
 bool shellGetLine(BaseSequentialStream *chp, char *line, unsigned size);
62
 bool shellGetLine(BaseSequentialStream *chp, char *line, unsigned size);
63
 
63
 
64
 
64
 
65
-#endif /* PDB_SHELL_H */
65
+#endif /* PDBS_SHELL_H */

+ 3
- 3
src/stm32f072_bootloader.h View File

16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
  */
17
  */
18
 
18
 
19
-#ifndef PDB_STM32F072_BOOTLOADER_H
20
-#define PDB_STM32F072_BOOTLOADER_H
19
+#ifndef PDBS_STM32F072_BOOTLOADER_H
20
+#define PDBS_STM32F072_BOOTLOADER_H
21
 
21
 
22
 #include <stdint.h>
22
 #include <stdint.h>
23
 
23
 
42
 void dfu_run_bootloader(void);
42
 void dfu_run_bootloader(void);
43
 
43
 
44
 
44
 
45
-#endif /* PDB_STM32F072_BOOTLOADER_H */
45
+#endif /* PDBS_STM32F072_BOOTLOADER_H */

+ 3
- 3
src/usbcfg.h View File

32
     limitations under the License.
32
     limitations under the License.
33
 */
33
 */
34
 
34
 
35
-#ifndef PDB_USBCFG_H
36
-#define PDB_USBCFG_H
35
+#ifndef PDBS_USBCFG_H
36
+#define PDBS_USBCFG_H
37
 
37
 
38
 #include <hal.h>
38
 #include <hal.h>
39
 
39
 
43
 extern SerialUSBDriver SDU1;
43
 extern SerialUSBDriver SDU1;
44
 
44
 
45
 
45
 
46
-#endif  /* PDB_USBCFG_H */
46
+#endif  /* PDBS_USBCFG_H */

Loading…
Cancel
Save