CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

[SOLVED]Convert hex from kbd.c to int

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
matheuslps



Joined: 29 Sep 2010
Posts: 73
Location: Brazil

View user's profile Send private message MSN Messenger

[SOLVED]Convert hex from kbd.c to int
PostPosted: Sat Feb 08, 2014 7:52 pm     Reply with quote

I am using the kbc.c driver.

But it returns hex codes, like 0x35 = '5'.

How to make that return an int?

thanks.


Last edited by matheuslps on Sun Feb 09, 2014 6:36 am; edited 1 time in total
amelia



Joined: 26 Nov 2007
Posts: 2

View user's profile Send private message

PostPosted: Sun Feb 09, 2014 5:36 am     Reply with quote

Simply: return - '0'; 0x35 - 0x30 = 5
amelia
matheuslps



Joined: 29 Sep 2010
Posts: 73
Location: Brazil

View user's profile Send private message MSN Messenger

PostPosted: Sun Feb 09, 2014 6:35 am     Reply with quote

amelia!!

Thanks. That worked!!!! So easy and I could not imagine that.

SOLVED!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group