1
0
forked from me/IronOS

Clean up PD voltage selection for flexibility

This commit is contained in:
Ben V. Brown
2021-04-04 22:58:53 +10:00
parent 77fd9f6a2d
commit 5fd969ada7
5 changed files with 70 additions and 81 deletions

View File

@@ -8,9 +8,5 @@
#ifndef USER_BSP_PD_H_
#define USER_BSP_PD_H_
#include "BSP.h"
/*
* An array of all of the desired voltages & minimum currents in preferred order
*/
extern const uint16_t USB_PD_Desired_Levels[];
extern const uint8_t USB_PD_Desired_Levels_Len;
#endif /* USER_BSP_PD_H_ */

View File

@@ -8,15 +8,5 @@
#include "BSP_PD.h"
#include "Model_Config.h"
#ifdef POW_PD
/*
* An array of all of the desired voltages & minimum currents in preferred order
*/
const uint16_t USB_PD_Desired_Levels[] = {
// mV desired input, mA minimum required current
12000, 2400, // 12V @ 2.4A
9000, 2000, // 9V @ 2A
5000, 100, // 5V @ whatever
};
const uint8_t USB_PD_Desired_Levels_Len = 3;
#endif

View File

@@ -8,19 +8,5 @@
#include "BSP_PD.h"
#include "Model_Config.h"
#ifdef POW_PD
/*
* An array of all of the desired voltages & minimum currents in preferred order
*/
const uint16_t USB_PD_Desired_Levels[] = {
// mV desired input, mA minimum required current
// Tip is ~ 7.5 ohms
20000, 2666, // 20V, 2.6A
18000, 2400, // 18V, 2.4A
15000, 2000, // 15V 2A
12000, 1600, // 12V @ 1.6A
9000, 1200, // 9V @ 1.2A
5000, 100, // 5V @ whatever
};
const uint8_t USB_PD_Desired_Levels_Len = 6;
#endif