Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions for USBPD & SDK, submodule Update #144

Closed
wants to merge 23 commits into from

Conversation

21km43
Copy link

@21km43 21km43 commented Sep 12, 2024

  • Add functions for usbpd.
uint8_t usbpd_sink_get_pdo_num(void);
uint8_t usbpd_sink_get_pps_num(void);
uint16_t usbpd_sink_get_pdo_voltage(int index);
uint16_t usbpd_sink_get_pdo_current(int index);
uint16_t usbpd_sink_get_pps_min_voltage(int index);
uint16_t usbpd_sink_get_pps_max_voltage(int index);
uint16_t usbpd_sink_get_pps_current(int index);
  • Bug fix (Typo) in ch32l103_usb.h
#ifdef __cplusplus
 extern "C" {
#endif

#ifdef __cplusplus
 extern "C" {
#endif
  • Update ch32l103 sdk
  • Update ch32x035 sdk
    • ch32x035 does not support to set GPIO to open drain manually, so pinmap.c should change to ...
      switch (cnf)
      {
          case CH_CNF_OUTPUT_PP:
               GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
               break;
#if !defined(CH32X035)
          case CH_CNF_OUTPUT_OD:
               GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_OD;
               break;
#endif
          case CH_CNF_OUTPUT_AFPP:
               GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
               break;
#if !defined(CH32X035)
          case CH_CNF_OUTPUT_AFOD:
               GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
               break; 
#endif          
          default:
               GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
               break;
      }

@21km43 21km43 changed the title Add USB support for CH32L103 Bug fix and TinyUSB Version Up Sep 14, 2024
@21km43 21km43 changed the title Bug fix and TinyUSB Version Up Bug fix and TinyUSB Update Sep 14, 2024
@21km43 21km43 marked this pull request as ready for review September 14, 2024 23:52
@21km43 21km43 changed the title Bug fix and TinyUSB Update add functions for USBPD & TinyUSB Update Dec 16, 2024
@21km43 21km43 changed the title add functions for USBPD & TinyUSB Update Add functions for USBPD & TinyUSB Update Dec 16, 2024
@21km43 21km43 changed the title Add functions for USBPD & TinyUSB Update Add functions for USBPD & SDK, submodule Update Jan 11, 2025
@21km43
Copy link
Author

21km43 commented Jan 11, 2025

This PR will close because it has too many update.
I'll split it and re-create some PRs.

@21km43 21km43 closed this Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants