Skip to content
Permalink
Browse files

new ii ansible ops

  • Loading branch information
tehn committed Dec 8, 2016
1 parent e03a1e5 commit dfc5827cf6bd90824eab3279b1507852d5305c5e
Showing with 593 additions and 35 deletions.
  1. +1 −1 libavr32
  2. +4 −0 module/main.c
  3. +5 −0 simulator/tt.c
  4. +543 −30 src/ops/hardware.c
  5. +30 −0 src/ops/hardware.h
  6. +7 −2 src/ops/op.c
  7. +1 −1 src/ops/op.h
  8. +1 −1 src/teletype.h
  9. +1 −0 src/teletype_io.h
@@ -1817,6 +1817,10 @@ void tele_ii_tx(uint8_t addr, uint8_t* data, uint8_t l) {
}
}

void tele_ii_tx_now(uint8_t addr, uint8_t* data, uint8_t l) {
i2c_master_tx(addr, data, l);
}

void tele_ii_rx(uint8_t addr, uint8_t* data, uint8_t l) {
i2c_master_rx(addr, data, l);
}
@@ -57,6 +57,11 @@ void tele_ii_tx(uint8_t addr, uint8_t *data, uint8_t l) {
printf("\n");
}

void tele_ii_tx_now(uint8_t addr, uint8_t *data, uint8_t l) {
printf("II_tx addr:%" PRIu8 " l:%" PRId16, addr, l);
printf("\n");
}

void tele_ii_rx(uint8_t addr, uint8_t *data, uint8_t l) {
printf("II_rx addr:%" PRIu8 " l:%" PRId16, addr, l);
printf("\n");

Large diffs are not rendered by default.

@@ -30,4 +30,34 @@ extern const tele_op_t op_JF_GOD;
extern const tele_op_t op_JF_TUNE;
extern const tele_op_t op_JF_QT;

extern const tele_op_t op_KR_PRESET;
extern const tele_op_t op_KR_PATTERN;
extern const tele_op_t op_KR_SCALE;
extern const tele_op_t op_KR_PERIOD;
extern const tele_op_t op_KR_POS;
extern const tele_op_t op_KR_LOOP_ST;
extern const tele_op_t op_KR_LOOP_LEN;
extern const tele_op_t op_KR_RESET;

extern const tele_op_t op_MP_PRESET1;
extern const tele_op_t op_MP_RESET1;
extern const tele_op_t op_MP_STOP1;
extern const tele_op_t op_MP_SCALE;
extern const tele_op_t op_MP_PERIOD;

extern const tele_op_t op_LV_PRESET;
extern const tele_op_t op_LV_RESET;
extern const tele_op_t op_LV_PATTERN;
extern const tele_op_t op_LV_LOOP_ST;
extern const tele_op_t op_LV_LOOP_LEN;
extern const tele_op_t op_LV_POS;

extern const tele_op_t op_CY_PRESET;
extern const tele_op_t op_CY_RESET;
extern const tele_op_t op_CY_POS;
extern const tele_op_t op_CY_REV;
extern const tele_op_t op_CY_BRAKE;
extern const tele_op_t op_CY_ACCEL;
extern const tele_op_t op_CY_RANGE;

#endif
@@ -42,8 +42,13 @@ const tele_op_t *tele_ops[OPS] = {
&op_TR_TOG, &op_TR_PULSE, &op_II, &op_CV_SET, &op_MUTE, &op_UNMUTE,
&op_STATE, &op_JF_TR, &op_JF_RMODE, &op_JF_RUN, &op_JF_SHIFT, &op_JF_VTR,
&op_JF_MODE, &op_JF_TICK, &op_JF_VOX, &op_JF_NOTE, &op_JF_GOD, &op_JF_TUNE,
&op_JF_QT,

&op_JF_QT, &op_KR_PRESET, &op_KR_PATTERN, &op_KR_SCALE, &op_KR_PERIOD,
&op_KR_POS, &op_KR_LOOP_ST, &op_KR_LOOP_LEN, &op_KR_RESET, &op_MP_PRESET1,
&op_MP_RESET1, &op_MP_STOP1, &op_MP_SCALE, &op_MP_PERIOD, &op_LV_PRESET,
&op_LV_RESET, &op_LV_PATTERN, &op_LV_LOOP_ST, &op_LV_LOOP_LEN, &op_LV_POS,
&op_CY_PRESET, &op_CY_RESET, &op_CY_POS, &op_CY_REV, &op_CY_BRAKE, &op_CY_ACCEL,
&op_CY_RANGE,

// maths
&op_ADD, &op_SUB, &op_MUL, &op_DIV, &op_MOD, &op_RAND, &op_RRAND, &op_TOSS,
&op_MIN, &op_MAX, &op_LIM, &op_WRAP, &op_QT, &op_AVG, &op_EQ, &op_NE,
@@ -25,7 +25,7 @@ typedef struct {
const uint8_t params;
} tele_mod_t;

#define OPS 157
#define OPS 183
extern const tele_op_t *tele_ops[OPS];

#define MODS 7
@@ -10,7 +10,7 @@

#define ERROR_MSG_LENGTH 16

#define WELCOME "TELETYPE 1.2"
#define WELCOME "TELETYPE 1.3.0"


typedef enum {
@@ -16,6 +16,7 @@ extern void tele_s(uint8_t i);
extern void tele_cv_off(uint8_t i, int16_t v);
extern void tele_ii(uint8_t i, int16_t d);
extern void tele_ii_tx(uint8_t addr, uint8_t *data, uint8_t l);
extern void tele_ii_tx_now(uint8_t addr, uint8_t *data, uint8_t l);
extern void tele_ii_rx(uint8_t addr, uint8_t *data, uint8_t l);
extern void tele_scene(uint8_t i);
extern void tele_pi(void);

0 comments on commit dfc5827

Please sign in to comment.