Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/milkymist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b6241f0
Choose a base ref
...
head repository: m-labs/milkymist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 398cf75
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Nov 30, 2011

  1. Bump version number

    Sebastien Bourdeauducq committed Nov 30, 2011
    Copy the full SHA
    33e91c9 View commit details
  2. softusb: move implementation of trigger into macros

    This is just a bit of cleanup.
    
    - Werner
    wpwrak authored and Sebastien Bourdeauducq committed Nov 30, 2011
    Copy the full SHA
    398cf75 View commit details
Showing with 20 additions and 8 deletions.
  1. +1 −1 boards/milkymist-one/rtl/system.v
  2. +18 −6 softusb-input/main.c
  3. +1 −1 software/include/base/version.h
2 changes: 1 addition & 1 deletion boards/milkymist-one/rtl/system.v
Original file line number Diff line number Diff line change
@@ -917,7 +917,7 @@ sysctl #(
.ninputs(7),
.noutputs(2),
.clk_freq(`CLOCK_FREQUENCY),
.systemid(32'h11004D31) /* 1.1.0 final (0) on M1 */
.systemid(32'h12004D31) /* 1.2.0 final (0) on M1 */
) sysctl (
.sys_clk(sys_clk),
.sys_rst(sys_rst),
24 changes: 18 additions & 6 deletions softusb-input/main.c
Original file line number Diff line number Diff line change
@@ -29,6 +29,18 @@

//#define TRIGGER

#ifdef TRIGGER

#define TRIGGER_ON() wio8(SIE_SEL_TX, 3)
#define TRIGGER_OFF() wio8(SIE_SEL_TX, 2)

#else

#define TRIGGER_ON() ((void) 0)
#define TRIGGER_OFF() ((void) 0)

#endif /* !TRIGGER */

enum {
USB_PID_OUT = 0xe1,
USB_PID_IN = 0x69,
@@ -291,15 +303,15 @@ static int control_transfer(unsigned char addr, struct setup_packet *p,
usb_buffer[0] = USB_PID_DATA0;
memcpy(&usb_buffer[1], p, 8);
usb_crc16(&usb_buffer[1], 8, &usb_buffer[9]);
#ifdef TRIGGER
wio8(SIE_SEL_TX, 3);
#endif

TRIGGER_ON();

/* send them back-to-back */
usb_tx(setup, 3);
usb_tx(usb_buffer, 11);
#ifdef TRIGGER
wio8(SIE_SEL_TX, 2);
#endif

TRIGGER_OFF();

/* get ACK token from device */
if(usb_rx_ack() != 1) {
print_string(setup_ack);
2 changes: 1 addition & 1 deletion software/include/base/version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef __VERSION_H
#define __VERSION_H

#define VERSION "1.1"
#define VERSION "1.2"

#endif /* __VERSION_H */