Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of I2S by
Revision 1:6e705b2ecb91, committed 2014-02-04
- Comitter:
- edy555
- Date:
- Tue Feb 04 15:21:28 2014 +0000
- Parent:
- 0:455d5826751b
- Commit message:
- add rx slave and tx master trial
Changed in this revision
| I2S.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/I2S.cpp Wed Sep 19 10:53:33 2012 +0000
+++ b/I2S.cpp Tue Feb 04 15:21:28 2014 +0000
@@ -491,9 +491,9 @@
if (clk_d == true) {
if (_clk == p15)
- LPC_PINCON->PINSEL0 |= (val1 << 8);
+ LPC_PINCON->PINSEL1 |= (val2 << 14);
else
- LPC_PINCON->PINSEL1 |= (val2 << 14);
+ LPC_PINCON->PINSEL0 |= (val1 << 8);
}
}
}
@@ -549,9 +549,12 @@
if (_rxtx == I2S_TRANSMIT) {
int regvals = ((pre_num << 8) & 0xFF00) | (pre_den & 0xFF);
LPC_I2S->I2STXRATE = regvals; // Setting the X/Y fraction
- LPC_I2S->I2STXBITRATE = (bitrate_div - 1) & 0x3F;// Setting up the bitrate divider, the periferal adds one to this
+ //LPC_I2S->I2STXBITRATE = (bitrate_div - 1) & 0x3F;// Setting up the bitrate divider, the periferal adds one to this
- LPC_I2S->I2STXMODE = fourwire << 2;
+ //LPC_I2S->I2STXMODE = fourwire << 2;
+
+ LPC_I2S->I2STXBITRATE = 4-1;// Setting up the bitrate divider, the periferal adds one to this
+ LPC_I2S->I2STXMODE = 0x2;
if (mclk_d == true) {
LPC_I2S->I2STXMODE |= (1 << 3);
