aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Models/PPCPendingUpload.cs
blob: 408fd74dc2365d3ff836e9e0034c20be47731540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Tango.MachineService.Models
{
    public class PPCPendingUpload
    {
        public String Token { get; set; }

        public String Version { get; set; }

        public String FirmwareVersion { get; set; }

        public String UserGuid { get; set; }

        public String Comments { get; set; }

        public String MachineVersionGuid { get; set; }

        public String BlobName { get; set; }

        public String InstallerBlobName { get; set; }
    }
}
span> Semaphore_Handle updateSem; void UpdateUsb(void) { // // Terminate the USB device and detach from the bus. // USBDCDTerm(0); // // Disable all interrupts. // ROM_IntMasterDisable(); #ifdef WATCHDOG ROM_WatchdogResetDisable(WATCHDOG0_BASE); uint32_t timeout = 0xFFFFFFFFU; ROM_WatchdogReloadSet(WATCHDOG0_BASE, timeout); #endif ControlStop(); MillisecStop(); HeatersEnd(); // // Disable SysTick and its interrupt. // ROM_SysTickIntDisable(); ROM_SysTickDisable(); // // Disable all processor interrupts. Instead of disabling them one at a // time, a direct write to NVIC is done to disable all peripheral // interrupts. // HWREG(NVIC_DIS0) = 0xffffffff; HWREG(NVIC_DIS1) = 0xffffffff; HWREG(NVIC_DIS2) = 0xffffffff; HWREG(NVIC_DIS3) = 0xffffffff; HWREG(NVIC_DIS4) = 0xffffffff; // // Enable and reset the USB peripheral. // ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_USB0); ROM_SysCtlPeripheralReset(SYSCTL_PERIPH_USB0); ROM_USBClockEnable(USB0_BASE, 8, USB_CLOCK_INTERNAL); // // Wait for about a second. // ROM_SysCtlDelay(SYS_CLK_FREQ / 3); // // Re-enable interrupts at the NVIC level. // ROM_IntMasterEnable(); // // Call the USB boot loader. // ROM_UpdateUSB(0); // // Should never get here, but just in case. // while(1) { } } Void updateTask(UArg arg0, UArg arg1) { // // Wait until new updTE ARRIVED // Semaphore_pend(updateSem, BIOS_WAIT_FOREVER); UpdateUsb(); } extern Semaphore_Handle ReconnectSem; void ReconnectUsb(void) { //USBCDC_close(); } Void ReconnectTask(UArg arg0, UArg arg1) { // // Wait until new updTE ARRIVED // while (1) { Semaphore_pend(ReconnectSem, BIOS_WAIT_FOREVER); ReconnectUsb(); } }