Hi
Take a look at http://www.utasker.com/kinetis/FRDM-KL25Z.html
To configure a port as input it uses
_CONFIG_PORT_INPUT(B, PORTB_BIT10, PORT_PS_UP_ENABLE);
or as output
_CONFIG_PORT_OUTPUT(B, PORTB_BIT10, (PORT_SRE_SLOW | PORT_DSE_HIGH));
(all details of the clocking etc. are automated)
It includes a KL25 Keil configuration and allows you to simulate the device and the board - this allows you to study the registers and operation for learning purposes and later develop projects much more efficiently than using traditional techniques (of course checking the register details in the user's manual helps too).
To change a bit to '1' or '0' you can then use
_SETBITS(B, PORTB_BIT10);
_CLEARBITS(B, PORTB_BIT10);
To toggle ths state:
_TOGGLE_PORT(B, PORTB_BIT10);
and various other variations.
To read the state of an input pin:
_READ_PORT_MASK(B, PORTB_BIT10);
Regards
Mark
Kinetis: µTasker Kinetis support
K25: µTasker Kinetis FRDM-KL25Z support / µTasker Kinetis TWR-KL25Z48M support
For the complete "out-of-the-box" Kinetis experience and faster time to market