-
Notifications
You must be signed in to change notification settings - Fork 3k
Create pwmout_api.c #906
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
Create pwmout_api.c #906
Conversation
Added PWM support for the LPC812 using the SCT. Code was ported from LPC824 libs. First needed to modify us_ticker() to free up the SCT and use the MRT instead. PWM can support a maximum of 4 channels using any portpin. All channels will use the same period.
Activated the I2CSlave functions. Slave block read/write operations are fully supported. The slave byte read and writes need general modification to I2CSlave.cpp. See pending Issue. Activated the PWM functions. They are supported now using the SCT after updating us_ticker() to use the MRT instead of the SCT.
Added PWM object.
@@ -29,7 +29,7 @@ | |||
#define DEVICE_SERIAL_FC 1 | |||
|
|||
#define DEVICE_I2C 1 | |||
#define DEVICE_I2CSLAVE 0 | |||
#define DEVICE_I2CSLAVE 1 |
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.
Isn't this the target which will need modifications to have slave enabled?
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.
Hi Martin,
As explained in the comments for the pull request, the I2C slave can be
enabled and the slave block read/write operations are fine. The additional
work in I2CSlave.cpp is needed for a correct operation of the slave byte
read/write operations. This change includes platforms such as the LPC812 and
LPC824 because they have different I2C engines for master and slave.
Again, the currently accepted LPC824 I2C slave lib has that same problem and
doesn't work correctly for the slave byte read/writes.
Wim
From: Martin Kojtal [mailto:[email protected]]
Sent: donderdag 12 februari 2015 9:32
To: mbedmicro/mbed
Cc: Wim
Subject: Re: [mbed] Create pwmout_api.c (#906)
In libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC81X/device.h
#906 (comment) :
@@ -29,7 +29,7 @@
#define DEVICE_SERIAL_FC 1#define DEVICE_I2C 1
-#define DEVICE_I2CSLAVE 0
+#define DEVICE_I2CSLAVE 1
Isn't this the target which will need modifications to have slave enabled?
Reply to this email directly or view it on
https://github.com/mbedmicro/mbed/pull/906/files#r24565131 GitHub.
<https://github.com/notifications/beacon/AKMUNJ5mrGex1x6ADfFng6gpyjnPdGHRks5
nrFyBgaJpZM4DfF7f.gif>
Ok, understand. Why is I2C Slave enabled? |
I don't want to enable slave for this platform if we know it's not fully functional, as users might struggle in case they use byte oriented approach. That's why I asked why slave is enabled. What do you think? |
Then I propose you also disable the LPC824 I2C stuff since I know it is not Regards Wim From: Martin Kojtal [mailto:[email protected]] I don't want to enable slave for this platform if we know it's not fully Reply to this email directly or view it |
LPC812 - pwmout HAL implementation
Added PWM support for the LPC812 using the SCT. Code was ported from LPC824 libs.
First needed to modify us_ticker() to free up the SCT and use the MRT instead.
PWM can support a maximum of 4 channels using any portpin. All channels will use the same period.