function prototypes (this is a great debugger).
* Some functions are possibly missing on MacOS and in this case
* are replaced with "static inline" functions:
*
- * clock_gettime()
- * clock_nanosleep()
+ * clock_gettime(void)
+ * clock_nanosleep(void)
*/
#ifdef __APPLE__
extern MIDI_DEVICE midi_devices[MAX_MIDI_DEVICES];
extern int n_midi_devices;
-extern void get_midi_devices();
+extern void get_midi_devices(void);
extern AUDIO_DEVICE output_devices[MAX_AUDIO_DEVICES];
extern GMutex audio_mutex;
-extern int audio_open_input();
-extern void audio_close_input();
+extern int audio_open_input(void);
+extern void audio_close_input(void);
extern int audio_open_output(RECEIVER *rx);
extern void audio_close_output(RECEIVER *rx);
extern int audio_write(RECEIVER *rx,float left_sample,float right_sample);
extern int cw_audio_write(RECEIVER *rx,float sample);
-extern void audio_get_cards();
+extern void audio_get_cards(void);
char * audio_get_error_string(int err);
-float audio_get_next_mic_sample();
+float audio_get_next_mic_sample(void);
#endif
extern BANDSTACK_ENTRY bandstack_entries60_WRC15[];
extern BANDSTACK_ENTRY bandstack_entries60_UK[];
-extern int band_get_current();
-extern BAND *band_get_current_band();
+extern int band_get_current(void);
+extern BAND *band_get_current_band(void);
extern BAND *band_get_band(int b);
extern BAND *band_set_current(int b);
extern int get_band_from_frequency(long long f);
extern BANDSTACK *bandstack_get_bandstack(int band);
extern BANDSTACK_ENTRY *bandstack_get_bandstack_entry(int band,int entry);
-extern BANDSTACK_ENTRY *bandstack_entry_next();
-extern BANDSTACK_ENTRY *bandstack_entry_previous();
-extern BANDSTACK_ENTRY *bandstack_entry_get_current();
+extern BANDSTACK_ENTRY *bandstack_entry_next(void);
+extern BANDSTACK_ENTRY *bandstack_entry_previous(void);
+extern BANDSTACK_ENTRY *bandstack_entry_get_current(void);
-extern void bandSaveState();
-extern void bandRestoreState();
+extern void bandSaveState(void);
+extern void bandRestoreState(void);
char* getFrequencyInfo(long long frequency,int filter_low,int filter_high);
-int canTransmit();
+int canTransmit(void);
#endif
void beep_vol(long volume);
void beep_mute(int mute);
-void beep_init();
-void beep_close();
+void beep_init(void);
+void beep_close(void);
#endif
extern gboolean hpsdr_server;
extern gint client_socket;
extern gint start_spectrum(void *data);
-extern void start_vfo_timer();
+extern void start_vfo_timer(void);
extern gboolean remote_started;
extern gint listen_port;
-extern int create_hpsdr_server();
-extern int destroy_hpsdr_server();
+extern int create_hpsdr_server(void);
+extern int destroy_hpsdr_server(void);
extern int radio_connect_remote(char *host, int port);
extern char *css;
-extern void load_css();
+extern void load_css(void);
*
*/
-extern void discovery();
+extern void discovery(void);
extern char *ipaddr_tcp;
void equalizer_menu(GtkWidget *parent);
-void update_eq();
+void update_eq(void);
extern int ext_split_toggle(void *data);
-extern int ext_cw_setup();
extern int ext_cw_key(void *data);
extern int ext_update_squelch(void *data);
extern gint filter_step;
-extern void filterSaveState();
-extern void filterRestoreState();
+extern void filterSaveState(void);
+extern void filterRestoreState(void);
extern void filter_width_changed(int rx,int increment);
extern void filter_shift_changed(int rx,int increment);
#endif
extern char* getFrequencyInfo(long long frequency,int filter_low,int filter_high);
extern int getBand(long long frequency);
-extern int canTransmit();
+extern int canTransmit(void);
#endif
extern int process_function_switch(void *data);
extern void gpio_set_defaults(int ctrlr);
-extern void gpio_restore_actions();
-extern void gpio_restore_state();
-extern void gpio_save_state();
-extern void gpio_save_actions();
-extern int gpio_init();
-extern void gpio_close();
-extern unsigned int millis(); // to allow debouncing in i2c.c
+extern void gpio_restore_actions(void);
+extern void gpio_restore_state(void);
+extern void gpio_save_state(void);
+extern void gpio_save_actions(void);
+extern int gpio_init(void);
+extern void gpio_close(void);
+extern unsigned int millis(void); // to allow debouncing in i2c.c
#ifdef LOCALCW
extern int CWL_BUTTON;
extern int ENABLE_CW_BUTTONS;
extern int CW_ACTIVE_LOW;
extern void gpio_cw_sidetone_set(int level);
-extern int gpio_cw_sidetone_enabled();
+extern int gpio_cw_sidetone_enabled(void);
#endif
#endif
extern unsigned int i2c_address_2;
extern char *i2c_device;
-extern void i2c_init();
-extern void i2c_interrupt();
+extern void i2c_init(void);
+extern void i2c_interrupt(void);
};
void keyer_event(int left, int state);
-void keyer_update();
-void keyer_close();
-int keyer_init();
+void keyer_update(void);
+void keyer_close(void);
+int keyer_init(void);
#endif
#endif
//
// Layer-1 entry point, called once for all the MIDI devices
-// that have been defined. This is called upon startup by
-// Layer-2 through the function MIDIstartup.
+// that have been defined.
//
void register_midi_device(int index);
void close_midi_device(int index);
// When Layer-1 has received a MIDI message, it calls
// NewMidiEvent.
//
-// MIDIstartup looks for files containing descriptions for MIDI
-// devices and calls the Layer-1 function register_midi_device
-// for each device description that was successfully read.
void NewMidiEvent(enum MIDIevent event, int channel, int note, int val);
-int MIDIstartup(char *filename);
+int ReadLegacyMidiFile(char *filename);
void MidiAddCommand(int note, struct desc *desc);
-void MidiReleaseCommands();
+void MidiReleaseCommands(void);
//
// Layer-3 entry point (called by Layer2). In Layer-3, all the pihpsdr
extern void midi_menu(GtkWidget *parent);
extern void NewMidiConfigureEvent(enum MIDIevent event, int channel, int note, int val);
-extern void midi_save_state();
-extern void midi_restore_state();
+extern void midi_save_state(void);
+extern void midi_restore_state(void);
extern GtkWidget *sub_menu;
-extern void new_menu();
+extern void new_menu(void);
/*
extern GtkWidget* new_menu_init(int width,int height,GtkWidget *parent);
*/
-extern void start_step();
-extern void start_meter();
-extern void start_band();
-extern void start_bandstack();
-extern void start_mode();
-extern void start_filter();
-extern void start_noise();
-extern void start_encoder();
+extern void start_step(void);
+extern void start_meter(void);
+extern void start_band(void);
+extern void start_bandstack(void);
+extern void start_mode(void);
+extern void start_filter(void);
+extern void start_noise(void);
+extern void start_encoder(void);
extern void start_vfo(int vfo);
-extern void start_agc();
-extern void start_store();
-extern void start_rx();
-extern void start_tx();
-extern void start_diversity();
+extern void start_agc(void);
+extern void start_store(void);
+extern void start_rx(void);
+extern void start_tx(void);
+extern void start_diversity(void);
#ifdef PURESIGNAL
-extern void start_ps();
+extern void start_ps(void);
#endif
#ifdef CLIENT_SERVER
-extern void start_server();
+extern void start_server(void);
#endif
extern void encoder_step(int encoder,int step);
extern int send_general;
*/
-extern void schedule_high_priority();
-extern void schedule_general();
-extern void schedule_receive_specific();
-extern void schedule_transmit_specific();
+extern void schedule_high_priority(void);
+extern void schedule_general(void);
+extern void schedule_receive_specific(void);
+extern void schedule_transmit_specific(void);
extern void new_protocol_init(int pixels);
-extern void new_protocol_stop();
+extern void new_protocol_stop(void);
-extern void filter_board_changed();
-extern void pa_changed();
-extern void tuner_changed();
+extern void filter_board_changed(void);
+extern void pa_changed(void);
+extern void tuner_changed(void);
extern void setMox(int state);
-extern int getMox();
+extern int getMox(void);
extern void setTune(int state);
-extern int getTune();
+extern int getTune(void);
extern void new_protocol_audio_samples(RECEIVER *rx,short left_audio_sample,short right_audio_sample);
extern void new_protocol_iq_samples(int isample,int qsample);
-extern void new_protocol_flush_iq_samples();
+extern void new_protocol_flush_iq_samples(void);
extern void new_protocol_cw_audio_samples(short l, short r);
-extern void new_protocol_restart();
+extern void new_protocol_restart(void);
#endif
extern void noise_menu(GtkWidget *parent);
-extern void update_noise();
-extern void set_noise();
+extern void update_noise(void);
+extern void set_noise(void);
#ifndef _OLD_PROTOCOL_H
#define _OLD_PROTOCOL_H
-extern void old_protocol_stop();
-extern void old_protocol_run();
+extern void old_protocol_stop(void);
+extern void old_protocol_run(void);
extern void old_protocol_init(int rx,int pixels,int rate);
extern void old_protocol_set_mic_sample_rate(int rate);
extern int adc_overflow;
int ozy_open(void);
-int ozy_close();
+int ozy_close(void);
int ozy_get_firmware_string(unsigned char* buffer,int buffer_size);
int ozy_write(int ep,unsigned char* buffer,int buffer_size);
int ozy_read(int ep,unsigned char* buffer,int buffer_size);
-void ozy_load_fw();
+void ozy_load_fw(void);
int ozy_load_fpga(char *rbf_fnamep);
int ozy_set_led(int which, int on);
int ozy_reset_cpu(int reset);
int ozy_load_firmware(char *fnamep);
-int ozy_initialise();
+int ozy_initialise(void);
int ozy_discover(void); // returns 1 if a device found on USB
void ozy_i2c_readpwr(int addr); // sets local variables
PROPERTY* next_property;
};
-extern void clearProperties();
+extern void clearProperties(void);
extern void loadProperties(char* filename);
extern char* getProperty(char* name);
extern void setProperty(char* name,char* value);
#endif
extern gboolean autostart;
-extern void protocols_save_state();
-extern void protocols_restore_state();
+extern void protocols_save_state(void);
+extern void protocols_restore_state(void);
extern void configure_protocols(GtkWidget *parent);
extern gboolean server;
#endif
-extern void radio_stop();
-extern void reconfigure_radio();
-extern void start_radio();
-//extern void init_radio();
+extern void radio_stop(void);
+extern void reconfigure_radio(void);
+extern void start_radio(void);
+//extern void init_radio(void);
extern void radio_change_receivers(int r);
extern void radio_change_sample_rate(int rate);
-extern void radio_band_changed();
+extern void set_alex_antennas(void);
+extern void tx_vfo_changed(void);
extern void radio_set_split(int v);
extern void setMox(int state);
-extern int getMox();
+extern int getMox(void);
extern void setTune(int state);
-extern int getTune();
+extern int getTune(void);
extern void vox_changed(int state);
extern void frequency_changed(RECEIVER *rx);
-extern double getDrive();
+extern double getDrive(void);
extern void setDrive(double d);
-extern void calcDriveLevel();
-extern double getTuneDrive();
+extern void calcDriveLevel(void);
+extern double getTuneDrive(void);
extern void setTuneDrive(double d);
-extern void calcTuneDriveLevel();
+extern void calcTuneDriveLevel(void);
extern void setSquelch(RECEIVER *rx);
extern void radio_set_rf_gain(RECEIVER *rx);
extern void set_attenuation(int value);
extern void set_alex_attenuation(int v);
-extern int isTransmitting();
+extern int isTransmitting(void);
extern void setFrequency(long long f);
-extern long long getFrequency();
+extern long long getFrequency(void);
-extern void radioRestoreState();
-extern void radioSaveState();
+extern void radioRestoreState(void);
+extern void radioSaveState(void);
-extern void calculate_display_average();
+extern void calculate_display_average(RECEIVER *rx);
extern void set_filter_type(int filter_type);
extern void set_filter_size(int filter_size);
extern void radio_change_region(int region);
-extern void disable_rigctl();
+extern void disable_rigctl(void);
#ifdef CLIENT_SERVER
extern int remote_start(void *data);
#ifndef RIGCTL_H
#define RIGCTL_H
-void launch_rigctl ();
-int launch_serial ();
-void disable_sreial ();
+void launch_rigctl (void);
+int launch_serial (void);
+void disable_sreial (void);
-void close_rigctl_ports ();
-int rigctlGetMode();
+void close_rigctl_ports (void);
+int rigctlGetMode(void);
int lookup_band(int);
-char * rigctlGetFilter();
+char * rigctlGetFilter(void);
void set_freqB(long long);
extern int cat_control;
int set_alc(gpointer);
extern void rigctl_menu(GtkWidget *parent);
extern char ser_port[];
-extern void disable_rigctl();
-extern void disable_serial();
+extern void disable_rigctl(void);
+extern void disable_serial(void);
extern int serial_baud_rate;
extern int serial_parity;
extern int sliders_active_receiver_changed(void *data);
extern void update_agc_gain(double gain);
-extern void update_af_gain();
+extern void update_af_gain(void);
extern int update_mic_gain(void *);
extern int update_drive(void *);
extern int update_tune_drive(void *);
extern void set_filter_shift(int rx,int width);
extern GtkWidget *sliders_init(int my_width, int my_height);
-extern void sliders_update();
+extern void sliders_update(void);
extern void set_squelch(RECEIVER *rx);
extern void set_compression(TRANSMITTER *tx);
-extern void show_diversity_gain();
-extern void show_diversity_phase();
+extern void show_diversity_gain(void);
+extern void show_diversity_phase(void);
#endif
#ifndef _SOAPY_DISCOVERY_H
#define _SOAPY_DISCOVERY_H
-void soapy_discovery();
+void soapy_discovery(void);
#endif
#define BUFFER_SIZE 1024
-SoapySDRDevice *get_soapy_device();
+SoapySDRDevice *get_soapy_device(void);
void soapy_protocol_create_receiver(RECEIVER *rx);
void soapy_protocol_start_receiver(RECEIVER *rx);
void soapy_protocol_init(gboolean hf);
-void soapy_protocol_stop();
+void soapy_protocol_stop(void);
void soapy_protocol_set_rx_frequency(RECEIVER *rx,int v);
void soapy_protocol_set_rx_antenna(RECEIVER *rx,int ant);
void soapy_protocol_set_lna_gain(RECEIVER *rx,int gain);
extern int n_output_devices;
//extern int n_selected_output_device;
-extern int audio_open_input();
-extern void audio_close_input();
+extern int audio_open_input(void);
+extern void audio_close_input(void);
extern int audio_open_output(RECEIVER *rx);
extern void audio_close_output(RECEIVER *rx);
extern int audio_write(RECEIVER *rx,short left_sample,short right_sample);
-extern void audio_get_cards();
+extern void audio_get_cards(void);
#endif
typedef struct _MEM_STORE MEM;
extern MEM mem[];
-void memRestoreState();
-void memSaveState();
+void memRestoreState(void);
+void memSaveState(void);
void recall_memory_slot(int index);
void store_memory_slot(int index);
extern SWITCH *toolbar_switches;
-void update_toolbar_labels();
+void update_toolbar_labels(void);
void ptt_update(int state);
void mox_update(int state);
void tune_update(int state);
extern char new_version[];
-extern int check_update();
-extern int load_update();
+extern int check_update(void);
+extern int load_update(void);
extern char *step_labels[];
extern GtkWidget* vfo_init(int width,int height,GtkWidget *parent);
-extern int vfo_get_stepindex();
+extern int vfo_get_stepindex(void);
extern void vfo_set_step_from_index(int index);
extern void vfo_set_stepsize(int newstep);
extern int vfo_get_step_from_index(int index);
extern void vfo_move(long long hz,int round);
extern void vfo_id_move(int id,long long hz,int round);
extern void vfo_move_to(long long hz);
-extern void vfo_update();
+extern void vfo_update(void);
-extern void vfo_save_state();
-extern void vfo_restore_state();
-extern void modesettings_save_state();
-extern void modesettings_restore_state();
+extern void vfo_save_state(void);
+extern void vfo_restore_state(void);
+extern void modesettings_save_state(void);
+extern void modesettings_restore_state(void);
extern void vfo_band_changed(int id,int b);
extern void vfo_bandstack_changed(int b);
extern void vfo_mode_changed(int m);
extern void vfo_filter_changed(int f);
-extern void vfo_a_to_b();
-extern void vfo_b_to_a();
-extern void vfo_a_swap_b();
+extern void vfo_a_to_b(void);
+extern void vfo_b_to_a(void);
+extern void vfo_a_swap_b(void);
-extern int get_tx_vfo();
-extern int get_tx_mode();
-extern long long get_tx_freq();
+extern int get_tx_vfo(void);
+extern int get_tx_mode(void);
+extern long long get_tx_freq(void);
-extern void vfo_xvtr_changed();
+extern void vfo_xvtr_changed(void);
extern void vfo_rit_update(int rx);
extern void vfo_rit_clear(int rx);
*/
extern void update_vox(TRANSMITTER *tx);
-extern void vox_cancel();
-extern double vox_get_peak();
+extern void vox_cancel(void);
+extern double vox_get_peak(void);