Skip to content
Permalink
Browse files

move update_* to teletype_io.h

  • Loading branch information
samdoshi committed Apr 30, 2016
1 parent 07e73c3 commit eaee4ba68a799956fab18846422f10077568d963
Showing with 52 additions and 41 deletions.
  1. +1 −0 simulator/tt.c
  2. +1 −0 src/main.c
  3. +1 −0 src/teletype.c
  4. +0 −41 src/teletype.h
  5. +48 −0 src/teletype_io.h
  6. +1 −0 tests/main.c
@@ -7,6 +7,7 @@
#include <time.h>

#include "teletype.h"
#include "teletype_io.h"
#include "util.h"


@@ -58,6 +58,7 @@ serial framing:
#include "conf_board.h"
#include "help.h"
#include "teletype.h"
#include "teletype_io.h"

#define METRO_SCRIPT 8
#define INIT_SCRIPT 9
@@ -9,6 +9,7 @@
#include "ii.h"
#include "table.h"
#include "teletype.h"
#include "teletype_io.h"
#include "util.h"

#ifdef SIM
@@ -102,47 +102,6 @@ const char *to_v(int16_t);

extern tele_pattern_t tele_patterns[4];

typedef void (*update_metro_t)(int16_t, int16_t, uint8_t);
extern volatile update_metro_t update_metro;

typedef void (*update_tr_t)(uint8_t, int16_t);
extern volatile update_tr_t update_tr;

typedef void (*update_cv_t)(uint8_t, int16_t, uint8_t);
extern volatile update_cv_t update_cv;

typedef void (*update_cv_slew_t)(uint8_t, int16_t);
extern volatile update_cv_slew_t update_cv_slew;

typedef void (*update_delay_t)(uint8_t);
extern volatile update_delay_t update_delay;

typedef void (*update_s_t)(uint8_t);
extern volatile update_s_t update_s;

typedef void (*update_cv_off_t)(uint8_t, int16_t v);
extern volatile update_cv_off_t update_cv_off;

typedef void (*update_ii_t)(uint8_t, int16_t);
extern volatile update_ii_t update_ii;

typedef void (*update_scene_t)(uint8_t);
extern volatile update_scene_t update_scene;

typedef void (*update_pi_t)(void);
extern volatile update_pi_t update_pi;

typedef void (*run_script_t)(uint8_t);
extern volatile run_script_t run_script;

typedef void (*update_kill_t)(void);
extern volatile update_kill_t update_kill;

typedef void (*update_mute_t)(uint8_t, uint8_t);
extern volatile update_mute_t update_mute;

typedef void (*update_input_t)(uint8_t);
extern volatile update_input_t update_input;

extern char error_detail[16];

@@ -0,0 +1,48 @@
#ifndef _TELETYPE_IO_H_
#define _TELETYPE_IO_H_

#include <stdint.h>

typedef void (*update_metro_t)(int16_t, int16_t, uint8_t);
extern volatile update_metro_t update_metro;

typedef void (*update_tr_t)(uint8_t, int16_t);
extern volatile update_tr_t update_tr;

typedef void (*update_cv_t)(uint8_t, int16_t, uint8_t);
extern volatile update_cv_t update_cv;

typedef void (*update_cv_slew_t)(uint8_t, int16_t);
extern volatile update_cv_slew_t update_cv_slew;

typedef void (*update_delay_t)(uint8_t);
extern volatile update_delay_t update_delay;

typedef void (*update_s_t)(uint8_t);
extern volatile update_s_t update_s;

typedef void (*update_cv_off_t)(uint8_t, int16_t v);
extern volatile update_cv_off_t update_cv_off;

typedef void (*update_ii_t)(uint8_t, int16_t);
extern volatile update_ii_t update_ii;

typedef void (*update_scene_t)(uint8_t);
extern volatile update_scene_t update_scene;

typedef void (*update_pi_t)(void);
extern volatile update_pi_t update_pi;

typedef void (*run_script_t)(uint8_t);
extern volatile run_script_t run_script;

typedef void (*update_kill_t)(void);
extern volatile update_kill_t update_kill;

typedef void (*update_mute_t)(uint8_t, uint8_t);
extern volatile update_mute_t update_mute;

typedef void (*update_input_t)(uint8_t);
extern volatile update_input_t update_input;

#endif
@@ -3,6 +3,7 @@
#include "greatest/greatest.h"

#include "teletype.h"
#include "teletype_io.h"

#include "parser_tests.h"
#include "process_tests.h"

0 comments on commit eaee4ba

Please sign in to comment.