-
Notifications
You must be signed in to change notification settings - Fork 100
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
Series of AI85 Jira Ticket Fixes. #408
Conversation
/clang-format-run |
#define MXC_I2C_FASTPLUS_SPEED 1000000 | ||
#define MXC_I2C_HS_MODE 3400000 |
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.
I think these suffixes should all match. Either all end in "_SPEED" or "_MODE", dealer's choice.
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.
+1 for _SPEED
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.
Renamed to HIGH_SPEED
int hsLowClks, hsHiClks; | ||
|
||
// Calculate the period of SCL and set up 33% duty cycle | ||
ticksTotal = PeripheralClock / hz; | ||
hsLowClks = (ticksTotal * 2) / 3 - 1; | ||
hsHiClks = ticksTotal / 3 - 1; | ||
|
||
printf("Periph: %d\nHz: %d\n", PeripheralClock, hz); |
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.
Why print? Is this leftover from debug?
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.
Yep.
@@ -263,13 +263,15 @@ int MXC_UART_SetFlowCtrl(mxc_uart_regs_t *uart, mxc_uart_flow_t flowCtrl, int rt | |||
MXC_GPIO_Config(&gpio_cfg_uart0_flow); | |||
break; | |||
|
|||
#if (TARGET_NUM != 78000) |
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.
Are these necessary? Looking at max78000_files.mk, I don't see uart_me17.c getting added to the list of files to compile.
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.
Nope.
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.
Looks good pending Jacob's comments
#define MXC_I2C_FASTPLUS_SPEED 1000000 | ||
#define MXC_I2C_HS_MODE 3400000 |
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.
+1 for _SPEED
* [MSDK-1036] AI85/ME17: I2C2 RX/TX DMA added to Read/Write DMA functions. * [MSDK-1029] AI85: Removed unsupported UART HFC pins. * [MSDK-941] AI85: Added UART3 DMA Transaction Option. * [MSDK-941] GPIO: Reversed Interrupt Polarity for level-triggered mode. * [MSDK-1026] AI85: Added GPIO2 (LPGPIO) support. * [MSDK-1023] TMR: AI85: Save selected clock source frequencies for GetTime. * [MSDK-1035] Added I2C HS Mode support. * clang-format bot reformatting. * Requested changes: Removed leftover prints and renamed a few things. * I2C: ME17: Renamed HS_MODE to HIGH_SPEED. --------- Co-authored-by: sihyung-maxim <sihyung-maxim@users.noreply.github.com>
No description provided.