delsauce / ArduinoDueHiFi

An I2S audio codec driver library for the Arduino Due board.
42 stars 10 forks source link

Arduino i2s #5

Open audiobugz opened 9 years ago

audiobugz commented 9 years ago

Hi, there just got the due board through the post wanted to connect the CS4398 DAC chip Data sheet: http://www.cirrus.com/en/pubs/proDatasheet/CS4398_F1.pdf Wanted to use your example of the sine through but the library will not compile i have errors such as this is there some thing i could do to compile. I m very new to this and have tried to research with out any luck. Any help would be great. Thanks

In file included from ssc.c:45: ssc.h:48:17: error: sam.h: No such file or directory In file included from ssc.c:45: ssc.h:81: error: expected specifier-qualifier-list before 'uint32_t' ssc.h:109: error: expected specifier-qualifier-list before 'uint32_t' ssc.h:156: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_set_clockdivider' ssc.h:157: error: expected ')' before '' token ssc.h:159: error: expected ')' before '' token ssc.h:161: error: expected ')' before '' token ssc.h:162: error: expected ')' before '' token ssc.h:163: error: expected ')' before '' token ssc.h:164: error: expected ')' before '' token ssc.h:165: error: expected ')' before '' token ssc.h:166: error: expected ')' before '' token ssc.h:167: error: expected ')' before '' token ssc.h:168: error: expected ')' before '' token ssc.h:169: error: expected ')' before '' token ssc.h:170: error: expected ')' before '' token ssc.h:171: error: expected ')' before '' token ssc.h:172: error: expected ')' before '' token ssc.h:173: error: expected ')' before '' token ssc.h:174: error: expected ')' before '_' token ssc.h:175: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_rxcompare' ssc.h:176: error: expected ')' before '' token ssc.h:177: error: expected ')' before '_' token ssc.h:178: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_interrupt_mask' ssc.h:179: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_status' ssc.h:180: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_ready' ssc.h:181: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_empty' ssc.h:182: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_ready' ssc.h:183: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_enabled' ssc.h:184: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_enabled' ssc.h:193: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_write' ssc.h:194: error: expected '=', ',', ';', 'asm' or 'attribute' before 'sscread' ssc.h:195: error: expected ')' before '' token ssc.h:196: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_read_syncdata' ssc.h:202: error: expected ')' before '' token ssc.h:203: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_writeprotect_status' ssc.c:79: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_set_clockdivider' ssc.c:102: error: expected ')' before '' token ssc.c:182: error: expected ')' before '' token ssc.c:252: error: expected ')' before '' token ssc.c:267: error: expected ')' before '' token ssc.c:277: error: expected ')' before '' token ssc.c:287: error: expected ')' before '' token ssc.c:297: error: expected ')' before '' token ssc.c:307: error: expected ')' before '' token ssc.c:317: error: expected ')' before '' token ssc.c:328: error: expected ')' before '' token ssc.c:344: error: expected ')' before '' token ssc.c:359: error: expected ')' before '' token ssc.c:370: error: expected ')' before '' token ssc.c:382: error: expected ')' before '' token ssc.c:416: error: expected ')' before '' token ssc.c:450: error: expected ')' before '_' token ssc.c:470: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_rxcompare' ssc.c:488: error: expected ')' before '' token ssc.c:499: error: expected ')' before '_' token ssc.c:511: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_interrupt_mask' ssc.c:523: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_status' ssc.c:537: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_ready' ssc.c:554: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_empty' ssc.c:570: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_ready' ssc.c:586: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_enabled' ssc.c:602: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_enabled' ssc.c:701: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_write' ssc.c:725: error: expected '=', ',', ';', 'asm' or 'attribute' before 'sscread' ssc.c:748: error: expected ')' before '' token ssc.c:763: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_read_syncdata' ssc.c:801: error: expected ')' before '' token ssc.c:817: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_writeprotect_status'

delsauce commented 9 years ago

Did you have the Due selected from the board menu in the Arduino IDE? Looks like it can't find one of the core files that wouldn't be included if building for another target...

On Mon, Dec 8, 2014 at 11:38 AM, audiobugz notifications@github.com wrote:

Hi, there just got the due board through the post wanted to connect the CS4398 DAC chip Data sheet: http://www.cirrus.com/en/pubs/proDatasheet/CS4398_F1.pdf Wanted to use your example of the sine through but the library will not compile i have errors such as this is there some thing i could do to compile. I m very new to this and have tried to research with out any luck. Any help would be great. Thanks

In file included from ssc.c:45: ssc.h:48:17: error: sam.h: No such file or directory In file included from ssc.c:45: ssc.h:81: error: expected specifier-qualifier-list before 'uint32_t' ssc.h:109: error: expected specifier-qualifier-list before 'uint32_t' ssc.h:156: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_set_clockdivider' ssc.h:157: error: expected ')' before ' ' token ssc.h:159: error: expected ')' before '' token ssc.h:161: error: expected ')' before ' ' token ssc.h:162: error: expected ')' before '' token ssc.h:163: error: expected ')' before ' ' token ssc.h:164: error: expected ')' before '' token ssc.h:165: error: expected ')' before ' ' token ssc.h:166: error: expected ')' before '' token ssc.h:167: error: expected ')' before ' ' token ssc.h:168: error: expected ')' before '' token ssc.h:169: error: expected ')' before ' ' token ssc.h:170: error: expected ')' before '' token ssc.h:171: error: expected ')' before ' ' token ssc.h:172: error: expected ')' before '' token ssc.h:173: error: expected ')' before ' ' token ssc.h:174: error: expected ')' before '_' token ssc.h:175: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_rxcompare' ssc.h:176: error: expected ')' before ' ' token ssc.h:177: error: expected ')' before '_' token ssc.h:178: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_interrupt_mask' ssc.h:179: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_status' ssc.h:180: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_ready' ssc.h:181: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_empty' ssc.h:182: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_ready' ssc.h:183: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_enabled' ssc.h:184: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_enabled' ssc.h:193: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_write' ssc.h:194: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_read' ssc.h:195: error: expected ')' before '

_' token ssc.h:196: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_read_syncdata' ssc.h:202: error: expected ')' before '' token ssc.h:203: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_writeprotect_status' ssc.c:79: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_set_clockdivider' ssc.c:102: error: expected ')' before ' ' token ssc.c:182: error: expected ')' before '' token ssc.c:252: error: expected ')' before ' ' token ssc.c:267: error: expected ')' before '' token ssc.c:277: error: expected ')' before ' ' token ssc.c:287: error: expected ')' before '' token ssc.c:297: error: expected ')' before ' ' token ssc.c:307: error: expected ')' before '' token ssc.c:317: error: expected ')' before ' ' token ssc.c:328: error: expected ')' before '' token ssc.c:344: error: expected ')' before ' ' token ssc.c:359: error: expected ')' before '' token ssc.c:370: error: expected ')' before ' ' token ssc.c:382: error: expected ')' before '' token ssc.c:416: error: expected ')' before ' ' token ssc.c:450: error: expected ')' before '_' token ssc.c:470: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_rxcompare' ssc.c:488: error: expected ')' before ' ' token ssc.c:499: error: expected ')' before '_' token ssc.c:511: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_interrupt_mask' ssc.c:523: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_status' ssc.c:537: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_ready' ssc.c:554: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_empty' ssc.c:570: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_ready' ssc.c:586: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_tx_enabled' ssc.c:602: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_is_rx_enabled' ssc.c:701: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_write' ssc.c:725: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_read' ssc.c:748: error: expected ')' before '

_' token ssc.c:763: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_read_syncdata' ssc.c:801: error: expected ')' before '' token ssc.c:817: error: expected '=', ',', ';', 'asm' or 'attribute' before 'ssc_get_writeprotect_status'

— Reply to this email directly or view it on GitHub https://github.com/delsauce/ArduinoDueHiFi/issues/5.

audiobugz commented 9 years ago

Hi, thanks for the super fast reply!! :) i was being silly in the excitement Arduino 1.0.6 was opening. Just ordered the CS 4272 as RS dint have the CS4272. How was your experience with the chips? Have you got any documentation on your project?

Thanks again for the quick reply!!

delsauce commented 9 years ago

I did this on the 4270, but don't really have much documentation... Chip seemed to work fine, but I really didn't use the project all that much.

On Mon, Dec 8, 2014 at 12:42 PM, audiobugz notifications@github.com wrote:

Hi, thanks for the super fast reply!! :) i was being silly in the excitement Arduino 1.0.6 was opening. Just ordered the CS 4272 as RS dint have the CS4272. How was your experience with the chips? Have you got any documentation on your project?

Thanks again for the quick reply!!

— Reply to this email directly or view it on GitHub https://github.com/delsauce/ArduinoDueHiFi/issues/5#issuecomment-66183473 .

audiobugz commented 9 years ago

Hey, finally got all parts for the build i have sorted the power section out. But cant find any I2S pin info on the Arduino Due is this some thing you could help me with? also did you have to set up the SPI to set configurations in the CS4270?

I'm trying to document the build so maybe it could help other using the your code.

Thanks any information is well appreciated! power cs4273

audiobugz commented 9 years ago

Sorry delsauce if I'm bugging you but can you please help me understand your library a bit better.

1) Do i have still have to set the registers through the SPI bus to use your code? 2) Is the code using the CS4272 as the master with out a external clock such as the Due or crystal?

Thank you