You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <linux/spi/spidev.h>
#include <linux/types.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
extern "C" { #include "libiflytop_adc_capture.h"
}
void sound_capture_callback(uint32_t* data, uint32_t len) {}
int main(int argc, char const* argv[]) { error_code_t erro_code = sound_capturer_init("/dev/spidev1.0", 59, sound_capture_callback); if (erro_code != ksp_success) { sound_capturer_dump_last_error(); return -1; }
erro_code = sound_capturer_start(); if (erro_code != ksp_success) { sound_capturer_dump_last_error(); return -1; }
while (true) { sleep(1); }
return 0; }
|