aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F4xx/I2S/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01>2018-12-15 17:50:05 +0000
committergdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01>2018-12-15 17:50:05 +0000
commitf20ecc78178fc8cdfa682e100398c240224dbb4a (patch)
tree64272a45778baea1c1deed82d9223c3ddc87f6e7 /testhal/STM32/STM32F4xx/I2S/main.c
parent984f865b45b110915616c3c9629fe47b064bed99 (diff)
downloadChibiOS-f20ecc78178fc8cdfa682e100398c240224dbb4a.tar.gz
ChibiOS-f20ecc78178fc8cdfa682e100398c240224dbb4a.tar.bz2
ChibiOS-f20ecc78178fc8cdfa682e100398c240224dbb4a.zip
HAL callbacks rework.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12470 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'testhal/STM32/STM32F4xx/I2S/main.c')
-rw-r--r--testhal/STM32/STM32F4xx/I2S/main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/testhal/STM32/STM32F4xx/I2S/main.c b/testhal/STM32/STM32F4xx/I2S/main.c
index 7eaa1b075..6a5e0a236 100644
--- a/testhal/STM32/STM32F4xx/I2S/main.c
+++ b/testhal/STM32/STM32F4xx/I2S/main.c
@@ -21,7 +21,7 @@
static uint16_t i2s_rx_buf[I2S_BUF_SIZE];
-static void i2scallback(I2SDriver *i2sp, size_t offset, size_t n);
+static void i2scallback(I2SDriver *i2sp);
static const I2SConfig i2scfg = {
NULL,
@@ -32,11 +32,14 @@ static const I2SConfig i2scfg = {
16
};
-static void i2scallback(I2SDriver *i2sp, size_t offset, size_t n) {
+static void i2scallback(I2SDriver *i2sp) {
- (void)i2sp;
- (void)offset;
- (void)n;
+ if (i2sIsBufferComplete(i2sp)) {
+ /* 2nd buffer half processing.*/
+ }
+ else {
+ /* 1st buffer half processing.*/
+ }
}
/*