Skip to content

Commit

Permalink
Merge pull request #940 from Ralim/MHP30
Browse files Browse the repository at this point in the history
MHP30 Support
  • Loading branch information
Ralim committed May 8, 2021
2 parents a238a78 + 0887bbe commit 40087e6
Show file tree
Hide file tree
Showing 117 changed files with 67,144 additions and 743 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
model: ["TS100", "TS80", "TS80P", "Pinecil"]
model: ["TS100", "TS80", "TS80P", "Pinecil", "MHP30"]
fail-fast: true

steps:
Expand Down
8 changes: 8 additions & 0 deletions Documentation/Hardware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Notes on the various supported hardware

### MHP30

- Accelerometer is the MSA301, this is mounted roughly in the middle of the unit
- USB-PD is using the FUSB302
- The hardware I2C bus on PB6/7 is used for the MSA301 and FUSB302
- The OLED is the same SSD1306 as everything else, but its on a bit-banged bus
15 changes: 15 additions & 0 deletions source/Core/BSP/BSP.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ bool getIsPoweredByDCIN();
// Logs the system state to a debug interface if supported
void log_system_state(int32_t PWMWattsx10);

// Returns true if the tip is disconnected
bool isTipDisconnected();

// Status LED controls

enum StatusLED {
LED_OFF = 0, // Turn off status led
LED_STANDBY, // unit is in sleep /standby
LED_HEATING, // The unit is heating up to temperature
LED_HOT, // The unit is at operating temperature
LED_COOLING_STILL_HOT, // The unit is off and cooling but still hot
LED_UNKNOWN, //
};
void setStatusLED(const enum StatusLED state);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 0 additions & 1 deletion source/Core/BSP/BSP_PD.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
#ifndef USER_BSP_PD_H_
#define USER_BSP_PD_H_
#include "BSP.h"
bool getFUS302IRQLow(); // Return true if the IRQ line is still held low

#endif /* USER_BSP_PD_H_ */
2 changes: 0 additions & 2 deletions source/Core/BSP/Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "FreeRTOSConfig.h"
enum Orientation { ORIENTATION_LEFT_HAND = 0, ORIENTATION_RIGHT_HAND = 1, ORIENTATION_FLAT = 3 };

// It is assumed that all hardware implements an 8Hz update period at this time
#define PID_TIM_HZ (8)
#define TICKS_SECOND configTICK_RATE_HZ
#define TICKS_MIN (60 * TICKS_SECOND)
#define TICKS_100MS (TICKS_SECOND / 10)
Expand Down

0 comments on commit 40087e6

Please sign in to comment.