aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/Blower.cs
blob: 55ee6a9436f6b82ff52789b940ae6e435fe1a2d7 (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
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Text;
using System.Linq;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Tango.PMR.Stubs;
using Tango.Stubs;

//----------------------
const Int32 I2C_ID =  2;
const Int32 I2C_Slave_Add = 0x98;
//----------------------

public void OnExecute(StubManager stubManager)
{

	// --------------------- I2C write multibyte --------------------- 	
	StubI2CWriteBytesRequest stubI2CWriteBytesRequest = new StubI2CWriteBytesRequest();
	stubI2CWriteBytesRequest.I2CId = I2C_ID;
	stubI2CWriteBytesRequest.SlaveAddress = I2C_Slave_Add;
	
	UInt32 uInt32 = new UInt32();
	stubI2CWriteBytesRequest.BytesTWrite.Add(0x30);//AD5691R_CMD_WRITE_INPUT_N_UPDATE_REG
	stubI2CWriteBytesRequest.BytesTWrite.Add(0xff);//0 (0V) - 0xFF (8V)
	stubI2CWriteBytesRequest.BytesTWrite.Add(0x00);//

	
	var response = stubManager.Run<StubI2CWriteBytesResponse>(stubI2CWriteBytesRequest);
	

	
	
}