Code for measuring the signal with a specified length and sampling rate, and saving it on a SD card.

Dependencies:   EALib I2S mbed

Committer:
msamadani
Date:
Thu Oct 05 17:44:39 2017 +0000
Revision:
2:8c5b6522139f
Parent:
0:c05b00be2229
A version of the code that initializes the SD RAM, activates the codec, measures the signal and saves the signal onto the SD Card.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
msamadani 0:c05b00be2229 1
msamadani 0:c05b00be2229 2
msamadani 0:c05b00be2229 3
msamadani 0:c05b00be2229 4 #ifndef SAVEPOWER_H
msamadani 0:c05b00be2229 5 #define SAVEPOWER_H
msamadani 0:c05b00be2229 6
msamadani 0:c05b00be2229 7 #include "mbed.h"
msamadani 0:c05b00be2229 8 #include "sdram.h"
msamadani 0:c05b00be2229 9
msamadani 0:c05b00be2229 10 #define MIND_BUSY 0x00000001 /* MII is Busy */
msamadani 0:c05b00be2229 11 #define DP83848C_DEF_ADR 0x0100 /* Default PHY device address */
msamadani 0:c05b00be2229 12 #define MII_WR_TOUT 0x00050000 /* MII Read timeout count */
msamadani 0:c05b00be2229 13 #define PHY_REG_BMCR 0x00 /* Basic Mode Control Register */
msamadani 0:c05b00be2229 14 #define PHY_BMCR_PWR_DOWN (1 << 11) /* 1 = General power down mode */
msamadani 0:c05b00be2229 15
msamadani 0:c05b00be2229 16
msamadani 0:c05b00be2229 17
msamadani 0:c05b00be2229 18 void savePower(void);
msamadani 0:c05b00be2229 19 static int phy_write(unsigned int PhyReg, unsigned short Data);
msamadani 0:c05b00be2229 20
msamadani 0:c05b00be2229 21
msamadani 0:c05b00be2229 22
msamadani 0:c05b00be2229 23
msamadani 0:c05b00be2229 24
msamadani 0:c05b00be2229 25 #endif