I'm trying to make a script environment with datatypes (or classes)
for accessing hardware registers. At the top level, I would like the
ability to bitwise ops if bit slice brackets are used, but if no
brackets are used, I would like it to write/read the whole value.
For example, if I have someth
mark.sea...@gmail.com wrote:
I'm trying to make a script environment with datatypes (or classes)
for accessing hardware registers. At the top level, I would like the
ability to bitwise ops if bit slice brackets are used, but if no
brackets are used, I would like it to write/read the whole value.
On Jan 30, 9:02 am, mark.sea...@gmail.com wrote:
> I'm trying to make a script environment with datatypes (or classes)
> for accessing hardware registers. At the top level, I would like the
> ability to bitwise ops if bit slice brackets are used, but if no
> brackets are used, I would like it to w
On Jan 30, 9:55 am, Stef Mientki wrote:
> def __repr__ ( self ) :
> line = hex ( self.Value )
> line = line [:2] + line [2:].upper()
> return line
>
> btw, I'm a hardware guy too, and therefor I've never understood why the
> hex function returns lowercase ;-)
0xFF?? *Real* hardware
Thanks. So far these solutions will return strings. So I can't
really treat it like a variable, yet still perform bitslice on it,
since I need a special class to do bitslice and bit selection, but as
soon as I try to pass it into some other function to check a bit, I
gotta then do another operati
mark.sea...@gmail.com wrote:
Thanks. So far these solutions will return strings. So I can't
really treat it like a variable, yet still perform bitslice on it,
since I need a special class to do bitslice and bit selection, but as
soon as I try to pass it into some other function to check a bit,
mark.sea...@gmail.com wrote:
Thanks. So far these solutions will return strings. So I can't
really treat it like a variable, yet still perform bitslice on it,
since I need a special class to do bitslice and bit selection, but as
soon as I try to pass it into some other function to check a bit,
On Jan 29, 3:13 pm, Stef Mientki wrote:
> mark.sea...@gmail.com wrote:
> > Thanks. So far these solutions will return strings. So I can't
> > really treat it like a variable, yet still perform bitslice on it,
> > since I need a special class to do bitslice and bit selection, but as
> > soon as I
John Machin wrote:
On Jan 30, 9:02 am, mark.sea...@gmail.com wrote:
I'm trying to make a script environment with datatypes (or classes)
for accessing hardware registers. At the top level, I would like the
ability to bitwise ops if bit slice brackets are used, but if no
brackets are used, I woul
On Fri, Jan 30, 2009 at 9:02 AM, wrote:
> I'm trying to make a script environment with datatypes (or classes)
> for accessing hardware registers. At the top level, I would like the
> ability to bitwise ops if bit slice brackets are used, but if no
> brackets are used, I would like it to write/re
On Jan 29, 3:13 pm, Stef Mientki wrote:
> mark.sea...@gmail.com wrote:
> > Thanks. So far these solutions will return strings. So I can't
> > really treat it like a variable, yet still perform bitslice on it,
> > since I need a special class to do bitslice and bit selection, but as
> > soon as I
On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
> try this:
>
> class MyRegClass ( int ) :
> def __init__ ( self, value ) :
> self.Value = value
> def __repr__ ( self ) :
> line = hex ( self.Value )
> line = line [:2] + line [2:].upper()
> return line
def __repr__
Marc 'BlackJack' Rintsch wrote:
On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
try this:
class MyRegClass ( int ) :
def __init__ ( self, value ) :
self.Value = value
def __repr__ ( self ) :
line = hex ( self.Value )
line = line [:2] + line [2:].upper()
return li
Quoth Stef Mientki :
> Marc 'BlackJack' Rintsch wrote:
> > On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
> >
> >
> >> try this:
> >>
> >> class MyRegClass ( int ) :
> >> def __init__ ( self, value ) :
> >> self.Value = value
> >> def __repr__ ( self ) :
> >> line = hex ( se
On Fri, 30 Jan 2009 21:59:34 +0100, Stef Mientki wrote:
> Marc 'BlackJack' Rintsch wrote:
>> On Fri, 30 Jan 2009 00:25:03 +0100, Stef Mientki wrote:
>>
>>
>>> try this:
>>>
>>> class MyRegClass ( int ) :
>>> def __init__ ( self, value ) :
>>> self.Value = value
>>> def __repr__ ( self ) :
15 matches
Mail list logo