A
AMP
Hello,
I have the following Enum:
public enum BslCommand : byte
{
BSL_TXPWORD = 0x10,
BSL_TXBLK = 0x12,
BSL_RXBLK = 0x14,
BSL_MERAS = 0x18,
BSL_ECHECK = 0x1C
}
Then I try to use it:
BslCommand cmd = BslCommand.BSL_RXBLK;
q.bslTxRx(cmd, g, 0x00FA, null, blkin);
But I get the folowing Error:
Error 12 Argument '1': cannot convert from 'Daya.MainForm.BslCommand'
to 'byte'
What am I doing wrong?
If I make them const's ints (const int BSL_RXBLK = 0x14
it works but
the function definition is looking for a byte:
public int bslTxRx(byte cmd, uint addr, ushort len, byte[] blkout,
byte[] blkin)
Just a little confused.
Thanks
Mike
I have the following Enum:
public enum BslCommand : byte
{
BSL_TXPWORD = 0x10,
BSL_TXBLK = 0x12,
BSL_RXBLK = 0x14,
BSL_MERAS = 0x18,
BSL_ECHECK = 0x1C
}
Then I try to use it:
BslCommand cmd = BslCommand.BSL_RXBLK;
q.bslTxRx(cmd, g, 0x00FA, null, blkin);
But I get the folowing Error:
Error 12 Argument '1': cannot convert from 'Daya.MainForm.BslCommand'
to 'byte'
What am I doing wrong?
If I make them const's ints (const int BSL_RXBLK = 0x14
![Wink ;) ;)](/styles/default/custom/smilies/wink.gif)
the function definition is looking for a byte:
public int bslTxRx(byte cmd, uint addr, ushort len, byte[] blkout,
byte[] blkin)
Just a little confused.
Thanks
Mike