-
Notifications
You must be signed in to change notification settings - Fork 128
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
SDK fixes for BL702 (EFUSE, USB, ADC, etc.) #145
base: master
Are you sure you want to change the base?
Changes from 15 commits
b6199b2
ae8f6e5
53c0ef8
fe0e015
b0fd101
4d8363c
46f5981
e559bfd
95e5934
1dfb247
725478b
153ba83
c03f725
597077a
fc313fe
d6c2771
638ded6
ba2efc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
/** @defgroup ADC_CLK_DIV adc clock divison definition | ||
* @{ | ||
*/ | ||
#define ADC_CLK_DIV_1 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. give up div1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, explain. This is valid divider value for ADC clock and I'm using it in my project. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adc value is not inaccuracy in div1 in some cases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, of course. But ADC speed should match external signal driver impedance to get proper signal sampling. So, it is up to board and software developer to select proper divider value for their signal parameters to get accurate ADC sampling and reading. So I suppose, that we should not limit this parameter in SDK if it is allowed in datasheet and reference manual and there is no restrictions in errata. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For div1, we will remove in datasheet. |
||
#define ADC_CLK_DIV_4 1 | ||
#define ADC_CLK_DIV_8 2 | ||
#define ADC_CLK_DIV_12 3 | ||
|
@@ -183,7 +184,7 @@ void bflb_adc_link_rxdma(struct bflb_device_s *dev, bool enable); | |
* @param [in] channels pair number of channels | ||
* @return Zero on success; a negated errno value on failure | ||
*/ | ||
int bflb_adc_channel_config(struct bflb_device_s *dev, struct bflb_adc_channel_s *chan, uint8_t channels); | ||
int bflb_adc_channel_config(struct bflb_device_s *dev, const struct bflb_adc_channel_s *chan, uint8_t channels); | ||
|
||
/** | ||
* @brief Start adc conversion | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#ifndef _BFLB_PWM_V1_H | ||
#define _BFLB_PWM_V2_H | ||
#define _BFLB_PWM_V1_H | ||
|
||
#include "bflb_core.h" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must use return value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't process long GET_REPORT requests while using return value. So the only way is to pass
data
andlen
pointers to the application usbh_hid_get_report() function. This issue present in original Cherry USB implementation, but we could change this in bouffalo_sdk to implement proper HID requests handling.